From 16ac013bc6cfcee4423b4304c9dae27cf087e046 Mon Sep 17 00:00:00 2001 From: Santiago Date: Wed, 17 Jun 2026 08:34:59 -0300 Subject: [PATCH] chore(deps): bump tx3-sdk to 0.13.0 Updates the `tx3-sdk` dependency from 0.9.2 to the latest published release, 0.13.0, and adapts to its API changes: - `BytesEnvelope`'s `encoding: BytesEncoding` field became `content_type: String`; submit now passes `content_type: "hex"` (matching the SDK's own convention) and drops the removed `BytesEncoding` import. - `MissingTxArgDiagnostic.ty` was renamed to `arg_type`. The bump also pulls pallas up to the stable 1.x line, whose `pallas-crypto` moved key generation to `rand_core` 0.10. cshell otherwise stays on `rand_core` 0.9 (bip39/bip32, private-key encryption), so the `private_key_encryption_roundtrip` test now builds its test keys from bytes via the existing byte constructors instead of `SecretKey::new`/`SecretKeyExtended::new`. The `trp::Error` match and the `ParamType` match needed no changes. Co-Authored-By: Claude Opus 4.8 (1M context) --- Cargo.lock | 406 +++++++++++++++++++++++++++++++------------- Cargo.toml | 2 +- src/reports.rs | 2 +- src/tx/invoke.rs | 4 +- src/wallet/types.rs | 19 ++- 5 files changed, 310 insertions(+), 123 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 349665c..32e5a92 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -209,12 +209,6 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "bech32" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" - [[package]] name = "bech32" version = "0.11.1" @@ -223,12 +217,13 @@ checksum = "32637268377fc7b10a8c6d51de3e7fba1ce5dd371a96e342b34e6078db558e7f" [[package]] name = "binary-layout" -version = "3.3.0" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5845e3504cf59b9588fff324710f27ee519515b8a8a9f1207042da9a9e64f819" +checksum = "66c7e8da2156abef3421f6226ef339ade8c0d157ec50932d5e624f1c6a5127b4" dependencies = [ "doc-comment", "paste", + "thiserror 1.0.69", ] [[package]] @@ -238,6 +233,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43d193de1f7487df1914d3a568b772458861d33f9c54249612cc2893d6915054" dependencies = [ "bitcoin_hashes", + "rand 0.8.5", "rand_core 0.6.4", "serde", "unicode-normalization", @@ -341,6 +337,17 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +[[package]] +name = "chacha20" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "rand_core 0.10.1", +] + [[package]] name = "chrono" version = "0.4.42" @@ -461,6 +468,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + [[package]] name = "crc" version = "3.3.0" @@ -560,7 +576,7 @@ version = "0.14.0" dependencies = [ "anyhow", "backoff", - "bech32 0.11.1", + "bech32", "bip39", "chrono", "clap", @@ -943,11 +959,25 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "r-efi", + "r-efi 5.3.0", "wasip2", "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", + "rand_core 0.10.1", + "wasip2", + "wasip3", +] + [[package]] name = "gloo-net" version = "0.6.0" @@ -1186,7 +1216,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.1", + "socket2 0.5.10", "tokio", "tower-service", "tracing", @@ -1297,6 +1327,12 @@ dependencies = [ "zerovec", ] +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + [[package]] name = "ident_case" version = "1.0.1" @@ -1504,7 +1540,7 @@ dependencies = [ "rustls-pki-types", "rustls-platform-verifier", "soketto", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tokio-rustls", "tokio-util", @@ -1530,7 +1566,7 @@ dependencies = [ "rustc-hash", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tokio-stream", "tower 0.5.2", @@ -1555,7 +1591,7 @@ dependencies = [ "rustls-platform-verifier", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tower 0.5.2", "url", @@ -1570,7 +1606,7 @@ dependencies = [ "http", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -1605,6 +1641,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + [[package]] name = "libc" version = "0.2.177" @@ -1827,9 +1869,9 @@ checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "pallas" -version = "1.0.0-alpha.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0605daa84084821bb1351e6ab9c45dfb6008e4c6178f6344a1e1b342377f5540" +checksum = "48773d1214fa3e3a4d79f08eac74e3bfdad67c1e441c5817696cb42f34cbf138" dependencies = [ "pallas-addresses", "pallas-codec", @@ -1846,37 +1888,37 @@ dependencies = [ [[package]] name = "pallas-addresses" -version = "1.0.0-alpha.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef0ef7593326952c54c2a3b74621a7b2db01a134a957063b9e1a02b4599fdf89" +checksum = "1c3988277ebfa1c7efde42fb2382deebe80aa3f321fd5d2e87ef5ee9dfc7b685" dependencies = [ "base58", - "bech32 0.9.1", + "bech32", "crc", "cryptoxide", "hex", "pallas-codec", "pallas-crypto", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "pallas-codec" -version = "1.0.0-alpha.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bbc692a7682eea0f17f02b2018ba41a8c18868d3d12d517d8f10bc4950082c4" +checksum = "8dc8ec5e664aa50ae954c3e5d7d4887ab2b21cdf016a10422c0b2c97e7558686" dependencies = [ "hex", "minicbor", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "pallas-configs" -version = "1.0.0-alpha.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0645e6ae8f9cda02700525f6a053f273f301529bec85e58f51b346681cefb43d" +checksum = "f96807d2c3418d53031ca80a29c778951efa572f5f4aff85265ff6a64dfebe19" dependencies = [ "base64 0.22.1", "num-rational", @@ -1890,23 +1932,23 @@ dependencies = [ [[package]] name = "pallas-crypto" -version = "1.0.0-alpha.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "208477993383d858172e19fadb2fec1aee44add3bf900fc30a423a0bd9d4e9da" +checksum = "c62f08aa8af671cd4ebb41081b6ea857077b0587ffde16a640bd8f2af0e86b5d" dependencies = [ "cryptoxide", "hex", "pallas-codec", - "rand_core 0.9.3", + "rand_core 0.10.1", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "pallas-hardano" -version = "1.0.0-alpha.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26843555b4b5dbb19ee0d0f2d952f283648d460c0eb008d68e164d8483e10705" +checksum = "e73931aa6bb8a6adfd8f37fe991a7983b6024f3231fddbe488b56db6ab189170" dependencies = [ "binary-layout", "hex", @@ -1919,33 +1961,33 @@ dependencies = [ "serde_json", "serde_with", "tap", - "thiserror 1.0.69", + "thiserror 2.0.18", "tracing", ] [[package]] name = "pallas-network" -version = "1.0.0-alpha.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "313717b01632355e94f8be20eed5c7c66c17f0bb713c7dc5bcc908ffaf231aa1" +checksum = "aad130ec8195018a8308f63130c5bf49abdc5531efe7431257fb0278336adaa6" dependencies = [ "byteorder", "hex", - "itertools 0.13.0", + "itertools 0.14.0", "pallas-codec", "pallas-crypto", - "rand 0.8.5", - "socket2 0.5.10", - "thiserror 1.0.69", + "rand 0.10.1", + "socket2 0.6.4", + "thiserror 2.0.18", "tokio", "tracing", ] [[package]] name = "pallas-primitives" -version = "1.0.0-alpha.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ff6dbd8610190f4f3cfee9def23dde7ad71bdd7fdf82165ebc703dd9ef2342c" +checksum = "cac94485435820b8765c87e9f2c5167ba4729f56117a669aba5a3e4c4f522545" dependencies = [ "hex", "pallas-codec", @@ -1956,26 +1998,26 @@ dependencies = [ [[package]] name = "pallas-traverse" -version = "1.0.0-alpha.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceeb9d2d2d20ce6a240c616eb17515addffe435aede6422af72a91232a2274b4" +checksum = "f917f26d63e1e014d5ea1fc734307ea3a688b74991fe2eddee64a73c3ab15aaf" dependencies = [ "hex", - "itertools 0.13.0", + "itertools 0.14.0", "pallas-addresses", "pallas-codec", "pallas-crypto", "pallas-primitives", "paste", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "pallas-txbuilder" -version = "1.0.0-alpha.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "015c424818c4766d91c32d64bbeb0ecadbf537d95cc0d5ddf8dfccc919509175" +checksum = "7b97e466b38c75a8725fab9ca619c17cb66c09ab356f8e85bfe041f5e3c34e49" dependencies = [ "hex", "pallas-addresses", @@ -1985,14 +2027,14 @@ dependencies = [ "pallas-traverse", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "pallas-utxorpc" -version = "1.0.0-alpha.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "543c903e800f7ddb66a284e4a87f455976fbc0b02fbd83ee5ff3432c2a1035b5" +checksum = "c59b43ca1414603cc6d011c854f49afe3afbda60f39f90dae6f2879883cc84aa" dependencies = [ "pallas-codec", "pallas-crypto", @@ -2000,14 +2042,14 @@ dependencies = [ "pallas-traverse", "pallas-validate", "prost-types", - "utxorpc-spec 0.17.0", + "utxorpc-spec 0.19.2", ] [[package]] name = "pallas-validate" -version = "1.0.0-alpha.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73eb1a15a40f2b5433bb8933a476261ad13beb85161f77752d5382cf70bbb842" +checksum = "881df106d3b758f62105245b5e27b98766f1dc64f309115c60a8700ba85c3ea6" dependencies = [ "chrono", "hex", @@ -2018,7 +2060,7 @@ dependencies = [ "pallas-primitives", "pallas-traverse", "serde", - "thiserror 1.0.69", + "thiserror 2.0.18", "tracing", ] @@ -2244,8 +2286,8 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2 0.6.1", - "thiserror 2.0.17", + "socket2 0.5.10", + "thiserror 2.0.18", "tokio", "tracing", "web-time", @@ -2266,7 +2308,7 @@ dependencies = [ "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.17", + "thiserror 2.0.18", "tinyvec", "tracing", "web-time", @@ -2281,7 +2323,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.6.1", + "socket2 0.5.10", "tracing", "windows-sys 0.60.2", ] @@ -2301,6 +2343,12 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + [[package]] name = "rand" version = "0.8.5" @@ -2322,6 +2370,17 @@ dependencies = [ "rand_core 0.9.3", ] +[[package]] +name = "rand" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" +dependencies = [ + "chacha20", + "getrandom 0.4.2", + "rand_core 0.10.1", +] + [[package]] name = "rand_chacha" version = "0.3.1" @@ -2360,6 +2419,12 @@ dependencies = [ "getrandom 0.3.4", ] +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + [[package]] name = "ratatui" version = "0.29.0" @@ -2637,18 +2702,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "schemars" -version = "0.8.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" -dependencies = [ - "dyn-clone", - "schemars_derive", - "serde", - "serde_json", -] - [[package]] name = "schemars" version = "0.9.0" @@ -2673,18 +2726,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "schemars_derive" -version = "0.8.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn", -] - [[package]] name = "scopeguard" version = "1.2.0" @@ -2714,6 +2755,12 @@ dependencies = [ "libc", ] +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + [[package]] name = "send_wrapper" version = "0.4.0" @@ -2750,17 +2797,6 @@ dependencies = [ "syn", ] -[[package]] -name = "serde_derive_internals" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "serde_json" version = "1.0.145" @@ -2833,7 +2869,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", - "cpufeatures", + "cpufeatures 0.2.17", "digest", ] @@ -2917,12 +2953,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.6.1" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +checksum = "52d1cfed4120b4d927bf7c0f86d2087a4a7d6027c906d9f9d525a80573b9be51" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -3068,11 +3104,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.17", + "thiserror-impl 2.0.18", ] [[package]] @@ -3088,9 +3124,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", @@ -3174,7 +3210,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.1", + "socket2 0.6.4", "tokio-macros", "windows-sys 0.61.2", ] @@ -3439,18 +3475,23 @@ dependencies = [ [[package]] name = "tx3-sdk" -version = "0.9.2" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f956f0eb4d508d0b3612ff099631c2c4c19fe4dc8d65178c4d439367937193" +checksum = "16120896b5d73621383f4980b3047769de90aea90fe26f500152d61d2287ddaa" dependencies = [ "base64 0.22.1", - "bech32 0.11.1", + "bech32", + "bip39", + "cryptoxide", + "ed25519-bip32", "hex", + "pallas-addresses", + "pallas-crypto", "reqwest", - "schemars 0.8.22", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", + "tokio", "uuid", ] @@ -3504,6 +3545,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "untrusted" version = "0.9.0" @@ -3541,7 +3588,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a7693fb6cd3db60ea90f87a4445d0fc572dd8bbdb541fc68a32337c0a275e44" dependencies = [ "bytes", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tonic", "utxorpc-spec 0.18.1", @@ -3549,9 +3596,9 @@ dependencies = [ [[package]] name = "utxorpc-spec" -version = "0.17.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d984ee351b308377e118135e638a5d544fdb0855f12a3b088d9dcaf0432052" +checksum = "e59de89d0dfd8e594377b53a8f67a10de01bb63b15b169248760188fa06fb92a" dependencies = [ "bytes", "futures-core", @@ -3565,9 +3612,9 @@ dependencies = [ [[package]] name = "utxorpc-spec" -version = "0.18.1" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e59de89d0dfd8e594377b53a8f67a10de01bb63b15b169248760188fa06fb92a" +checksum = "aa35373e6fbf0ea73651328aecd1641f92684de54bd908e3aa9855866b1c9875" dependencies = [ "bytes", "futures-core", @@ -3633,7 +3680,16 @@ version = "1.0.1+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" dependencies = [ - "wit-bindgen", + "wit-bindgen 0.46.0", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen 0.51.0", ] [[package]] @@ -3694,6 +3750,40 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap 2.12.0", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags 2.10.0", + "hashbrown 0.15.5", + "indexmap 2.12.0", + "semver", +] + [[package]] name = "web-sys" version = "0.3.82" @@ -4143,6 +4233,94 @@ version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap 2.12.0", + "prettyplease", + "syn", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags 2.10.0", + "indexmap 2.12.0", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap 2.12.0", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] + [[package]] name = "writeable" version = "0.6.2" diff --git a/Cargo.toml b/Cargo.toml index 2f2b591..09cd5c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ keywords = ["cardano", "blockchain", "wallet"] categories = ["command-line-utilities", "blockchain", "cardano", "wallet"] [dependencies] -tx3-sdk = "0.9.2" +tx3-sdk = "0.13.0" # tx3-sdk = { git = "https://github.com/tx3-lang/rust-sdk.git" } # tx3-sdk = { path = "../../tx3-lang/rust-sdk/sdk" } diff --git a/src/reports.rs b/src/reports.rs index a09d5d9..ece5fd1 100644 --- a/src/reports.rs +++ b/src/reports.rs @@ -149,7 +149,7 @@ impl From for ErrorReport { "args".to_string(), ) .with_detail("arg", x.key) - .with_detail("type", x.ty), + .with_detail("type", x.arg_type), tx3_sdk::trp::Error::InputNotResolved(x) => { ErrorReport::new("Input not resolved".to_string(), "input".to_string()) .with_detail("input", x.name) diff --git a/src/tx/invoke.rs b/src/tx/invoke.rs index 8426f82..37a3db5 100644 --- a/src/tx/invoke.rs +++ b/src/tx/invoke.rs @@ -4,7 +4,7 @@ use serde_json::json; use std::path::PathBuf; use tracing::instrument; use tx3_sdk::{ - core::{BytesEncoding, BytesEnvelope}, + core::BytesEnvelope, trp::{SubmitParams, TxEnvelope}, }; @@ -85,7 +85,7 @@ pub async fn run(args: Args, ctx: &crate::Context) -> Result<()> { .trp_submit(SubmitParams { tx: BytesEnvelope { content: hex::encode(&cbor), - encoding: BytesEncoding::Hex, + content_type: "hex".to_string(), }, witnesses: vec![], }) diff --git a/src/wallet/types.rs b/src/wallet/types.rs index f18c36f..715f5a3 100644 --- a/src/wallet/types.rs +++ b/src/wallet/types.rs @@ -676,12 +676,17 @@ mod tests { #[test] fn private_key_encryption_roundtrip() { + use rand_core::RngCore as _; + let password = "hunter123"; + let mut rng = rand_core::UnwrapErr(rand_core::OsRng); + // --- standard - let private_key = - PrivateKey::Normal(SecretKey::new(rand_core::UnwrapErr(rand_core::OsRng))); + let mut sk_bytes = [0u8; SecretKey::SIZE]; + rng.fill_bytes(&mut sk_bytes); + let private_key = PrivateKey::Normal(sk_bytes.into()); let private_key_bytes = private_key.as_bytes(); @@ -697,9 +702,13 @@ mod tests { // --- extended - let private_key = PrivateKey::Extended(SecretKeyExtended::new(rand_core::UnwrapErr( - rand_core::OsRng, - ))); + let mut esk_bytes = [0u8; SecretKeyExtended::SIZE]; + rng.fill_bytes(&mut esk_bytes); + // Clamp to a valid Ed25519 extended secret key (the bit tweaks that + // SecretKeyExtended::from_bytes verifies). + esk_bytes[0] &= 0b1111_1000; + esk_bytes[31] = (esk_bytes[31] & 0b0011_1111) | 0b0100_0000; + let private_key = PrivateKey::Extended(SecretKeyExtended::from_bytes(esk_bytes).unwrap()); let private_key_bytes = private_key.as_bytes();