diff --git a/Cargo.lock b/Cargo.lock index 846cea9..0e746b3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3037,9 +3037,9 @@ dependencies = [ [[package]] name = "tx3-tir" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "152e332c5ab744e8f17d54dfa4b6e3e177d5055141a1f37625303d4613277a72" +checksum = "4bd8b43d04c3d116e901407cf4c6fa4949938f8904dddf7088cb97efcacd8bb2" dependencies = [ "ciborium", "hex", diff --git a/bin/tx3c/Cargo.toml b/bin/tx3c/Cargo.toml index 1bfc9de..e089e5a 100644 --- a/bin/tx3c/Cargo.toml +++ b/bin/tx3c/Cargo.toml @@ -12,7 +12,7 @@ homepage.workspace = true readme.workspace = true [dependencies] -tx3-tir = "0.17.0" +tx3-tir = "0.18.0" tx3-lang = { path = "../../crates/tx3-lang" } tx3-cardano = { path = "../../crates/tx3-cardano" } clap = { version = "4.5", features = ["derive"] } diff --git a/bin/tx3c/src/tii/schema.rs b/bin/tx3c/src/tii/schema.rs index 817bbda..2e3c336 100644 --- a/bin/tx3c/src/tii/schema.rs +++ b/bin/tx3c/src/tii/schema.rs @@ -73,6 +73,14 @@ impl<'a> SchemaCtx<'a> { "type": "object", "additionalProperties": self.map_type(value) }), + // A tuple is a fixed-length, positionally-typed array. + ast::Type::Tuple(elements) => json!({ + "type": "array", + "prefixItems": elements.iter().map(|t| self.map_type(t)).collect::>(), + "items": false, + "minItems": elements.len(), + "maxItems": elements.len() + }), ast::Type::Custom(id) => self.map_custom(&id.value), ast::Type::Undefined => json!({"type": "null"}), ast::Type::Utxo => { diff --git a/crates/tx3-cardano/Cargo.toml b/crates/tx3-cardano/Cargo.toml index faae070..dd7815f 100644 --- a/crates/tx3-cardano/Cargo.toml +++ b/crates/tx3-cardano/Cargo.toml @@ -17,7 +17,7 @@ pallas = { version = "1.0.0" } # pallas = { version = ">=1.0.0-alpha, <2.0.0", path = "../../../../txpipe/pallas/pallas" } # pallas = { git = "https://github.com/txpipe/pallas.git" } -tx3-tir = "0.17.0" +tx3-tir = "0.18.0" hex = "0.4.3" thiserror = "2.0.11" diff --git a/crates/tx3-lang/Cargo.toml b/crates/tx3-lang/Cargo.toml index da892c4..d2ffa90 100644 --- a/crates/tx3-lang/Cargo.toml +++ b/crates/tx3-lang/Cargo.toml @@ -18,7 +18,7 @@ trait-variant = { workspace = true } hex = { workspace = true } serde = { workspace = true } -tx3-tir = "0.17.0" +tx3-tir = "0.18.0" miette = { version = "7.4.0", features = ["fancy"] } pest = { version = "2.7.15", features = ["miette-error", "pretty-print"] } diff --git a/crates/tx3-resolver/Cargo.toml b/crates/tx3-resolver/Cargo.toml index 126dcdf..36e0b1e 100644 --- a/crates/tx3-resolver/Cargo.toml +++ b/crates/tx3-resolver/Cargo.toml @@ -13,7 +13,7 @@ homepage.workspace = true readme.workspace = true [dependencies] -tx3-tir = "0.17.0" +tx3-tir = "0.18.0" thiserror = { workspace = true } trait-variant = { workspace = true }