diff --git a/Cargo.lock b/Cargo.lock index 03d667e..e2874af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,28 +20,17 @@ version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "116019a174e912931d5b19ca7ab6a22596d12cdb1320358fad3368f0aba135a9" dependencies = [ - "amplify_apfloat", "amplify_derive", "amplify_num", "amplify_syn", "rand", "serde", "serde_json", - "serde_yaml", + "serde_yaml 0.8.26", "stringly_conversions", "toml", ] -[[package]] -name = "amplify_apfloat" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6641206decd3c43f5456a3506e77fc9ab8b4996c3e0c19573ae2bcc2e00bf0" -dependencies = [ - "amplify_num", - "bitflags", -] - [[package]] name = "amplify_derive" version = "2.11.3" @@ -151,15 +140,15 @@ dependencies = [ "base64", "bech32 0.9.1", "bitcoin_hashes 0.11.0", - "secp256k1 0.24.1", + "secp256k1 0.24.2", "serde", ] [[package]] name = "bitcoin_blockchain" -version = "0.9.0-alpha.1" +version = "0.9.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb134958010a8aa8c0e2e5098772649df3ae0b164bfe7a364b62bbb72d7be58d" +checksum = "d1047b4204cfc9a3e0e765794c06750e2abf0978f07d28bc2aae3f0839971a13" dependencies = [ "amplify", "chrono", @@ -198,7 +187,7 @@ dependencies = [ "amplify", "bitcoin 0.29.2", "miniscript", - "secp256k1 0.24.1", + "secp256k1 0.24.2", "serde", "slip132", "strict_encoding", @@ -234,14 +223,13 @@ dependencies = [ [[package]] name = "bitcoin_scripts" -version = "0.9.0-alpha.3" +version = "0.9.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c0327c7976c6887c8de334593d555f1a9734ba99c72bdd1ea74bfd25891023" +checksum = "0b6512b98b415f5a1147c521f2989bd3cbbc77378c9f3777382835859119729a" dependencies = [ "amplify", "bitcoin 0.29.2", - "confined_encoding", - "secp256k1 0.24.1", + "secp256k1 0.24.2", "serde", "serde_with", "stability", @@ -304,16 +292,16 @@ dependencies = [ [[package]] name = "clap" -version = "3.1.18" +version = "3.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2dbdf4bdacb33466e854ce889eee8dfd5729abf7ccd7664d0a2d60cd384440b" +checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" dependencies = [ "atty", "bitflags", "clap_derive", "clap_lex", "indexmap", - "lazy_static", + "once_cell", "strsim", "termcolor", "textwrap", @@ -321,9 +309,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "3.1.18" +version = "3.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c" +checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" dependencies = [ "heck", "proc-macro-error", @@ -364,39 +352,13 @@ dependencies = [ [[package]] name = "commit_verify" -version = "0.9.0-alpha.1" +version = "0.9.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd8bcf61fc592008bf2c04d4d9348a811503320d19a16f3f489f576f294316a8" +checksum = "79b115427218c894907f013305353b18fe35347d5daf9eb6b59d8df59a67bf92" dependencies = [ "amplify", "bitcoin_hashes 0.11.0", - "confined_encoding", -] - -[[package]] -name = "confined_encoding" -version = "0.9.0-alpha.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "966c456469f1109a96661bbf85404de76afb30888ed15be9286f7854c99c4465" -dependencies = [ - "amplify", - "bitcoin 0.29.2", - "bitcoin_hashes 0.11.0", - "chrono", - "confined_encoding_derive", - "half", -] - -[[package]] -name = "confined_encoding_derive" -version = "0.9.0-alpha.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7453f970f5059a5104bae26bfd4147ad5de1844bbd6eba2815499b072407a24" -dependencies = [ - "amplify_syn", - "encoding_derive_helpers", - "proc-macro2", - "syn", + "strict_encoding", ] [[package]] @@ -414,12 +376,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - [[package]] name = "cxx" version = "1.0.81" @@ -522,7 +478,7 @@ dependencies = [ "rpassword", "serde", "serde_with", - "serde_yaml", + "serde_yaml 0.9.16", "slip132", "strict_encoding", ] @@ -600,15 +556,6 @@ dependencies = [ "wasi 0.11.0+wasi-snapshot-preview1", ] -[[package]] -name = "half" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad6a9459c9c30b177b925162351f97e7d967c7ea8bab3b8352805327daf45554" -dependencies = [ - "crunchy", -] - [[package]] name = "hashbrown" version = "0.12.3" @@ -835,7 +782,6 @@ dependencies = [ "bitcoin_onchain", "bitcoin_scripts", "commit_verify", - "confined_encoding", "descriptors", "miniscript", "serde", @@ -960,9 +906,9 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff55dc09d460954e9ef2fa8a7ced735a964be9981fd50e870b2b3b0705e14964" +checksum = "d9512ffd81e3a3503ed401f79c33168b9148c75038956039166cd750eaa037c3" dependencies = [ "bitcoin_hashes 0.11.0", "rand", @@ -1064,6 +1010,19 @@ dependencies = [ "yaml-rust", ] +[[package]] +name = "serde_yaml" +version = "0.9.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92b5b431e8907b50339b51223b97d102db8d987ced36f6e4d03621db9316c834" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + [[package]] name = "slip132" version = "0.9.0-alpha.1" @@ -1102,9 +1061,9 @@ dependencies = [ [[package]] name = "strict_encoding" -version = "2.0.0-alpha.2" +version = "0.9.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a0358463899b0a7edfb4e46e96b770ed6250726d247cbea386e9769c7f48d6" +checksum = "ae10097e736d1b74a9e6fc8f202d3446ec78750571ac0bc73b7ab37cb6e2c9ec" dependencies = [ "amplify", "bitcoin 0.29.2", @@ -1128,9 +1087,9 @@ dependencies = [ [[package]] name = "strict_encoding_test" -version = "2.0.0-alpha.1" +version = "0.9.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc108771f81d5c5d1c4f295b86b16453ce51aaf71718afc824f05ea0df9f3752" +checksum = "7420824c59f38e850f94ddc452ddf1060466e69ea1ddafce3764cf5179eb6d30" dependencies = [ "amplify", "strict_encoding", @@ -1174,9 +1133,9 @@ dependencies = [ [[package]] name = "textwrap" -version = "0.15.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b3e525a49ec206798b40326a44121291b530c963cfb01018f63e135bac543d" +checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "time" @@ -1225,6 +1184,12 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +[[package]] +name = "unsafe-libyaml" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7ed8ba44ca06be78ea1ad2c3682a43349126c8818054231ee6f4748012aed2" + [[package]] name = "untrusted" version = "0.7.1" diff --git a/Cargo.toml b/Cargo.toml index 246fd62..8120625 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,10 +28,10 @@ required-features = ["cli"] [dependencies] amplify = "3.13.0" -strict_encoding_crate = { package = "strict_encoding", version = "2.0.0-alpha.1", features = ["bitcoin", "derive"], optional = true } +strict_encoding_crate = { package = "strict_encoding", version = "0.9.0-rc.1", features = ["bitcoin", "derive"], optional = true } bitcoin = "0.29.2" -bitcoin_scripts = "0.9.0-alpha.1" -bitcoin_blockchain = "0.9.0-alpha.1" +bitcoin_scripts = "0.9.0-rc.1" +bitcoin_blockchain = "0.9.0-rc.1" bitcoin_hd = { version = "0.9.0-alpha.1", path = "./hd" } bitcoin_onchain = { version = "0.9.0-alpha.1", path = "./onchain" } bitcoin_hwi = { version = "0.2.0", optional = true } @@ -41,10 +41,10 @@ slip132 = { version = "0.9.0-alpha.1", path = "./slip132", features = ["strict_e miniscript_crate = { package = "miniscript", version = "9.0.0", optional = true } electrum-client = { version = "0.12.0", optional = true } serde_crate = { package = "serde", version = "1", features = ["derive"], optional = true } -serde_with = { version = "1.5", features = ["hex"], optional = true } -serde_yaml = { version = "0.8.21", optional = true } +serde_with = { version = "1.14", features = ["hex"], optional = true } +serde_yaml = { version = "0.9", optional = true } chrono = "0.4" -clap = { version = "~3.1.18", optional = true, features = ["derive"] } +clap = { version = "~3.2.23", optional = true, features = ["derive"] } bip39 = { version = "1.0.1", optional = true } aes = { version = "0.7.5", optional = true } rpassword = { version = "5.0.1", optional = true } diff --git a/descriptors/Cargo.toml b/descriptors/Cargo.toml index ff93797..9b59b74 100644 --- a/descriptors/Cargo.toml +++ b/descriptors/Cargo.toml @@ -15,15 +15,15 @@ exclude = [] [dependencies] amplify = "3.13.0" -strict_encoding = "2.0.0-alpha.2" +strict_encoding = "0.9.0-rc.1" bitcoin = "0.29.2" -bitcoin_scripts = "0.9.0-alpha.1" -bitcoin_blockchain = "0.9.0-alpha.1" +bitcoin_scripts = "0.9.0-rc.1" +bitcoin_blockchain = "0.9.0-rc.1" bitcoin_hd = { version = "0.9.0-alpha.1", path = "../hd" } miniscript_crate = { package = "miniscript", version = "9.0.0", features = ["compiler"], optional = true } chrono = "0.4.19" serde_crate = { package = "serde", version = "1", optional = true } -serde_with = { version = "1.12", features = ["hex"], optional = true } +serde_with = { version = "1.14", features = ["hex"], optional = true } [features] all = [ diff --git a/hd/Cargo.toml b/hd/Cargo.toml index 2d88534..86c5f1a 100644 --- a/hd/Cargo.toml +++ b/hd/Cargo.toml @@ -15,9 +15,9 @@ exclude = [] [dependencies] amplify = "3.13.0" -strict_encoding = "2.0.0-alpha.2" +strict_encoding = "0.9.0-rc.1" bitcoin = "0.29.2" -secp256k1 = { version = "0.24.1", features = ["global-context"] } +secp256k1 = { version = "0.24.2", features = ["global-context"] } miniscript = { version = "9.0.0", optional = true } slip132 = { version = "0.9.0-alpha.1", path = "../slip132" } serde_crate = { package = "serde", version = "1", features = ["derive"], optional = true } diff --git a/onchain/Cargo.toml b/onchain/Cargo.toml index d98c41d..37b29c7 100644 --- a/onchain/Cargo.toml +++ b/onchain/Cargo.toml @@ -16,7 +16,7 @@ exclude = [] [dependencies] amplify = "3.13.0" bitcoin = "0.29.2" -strict_encoding = "2.0.0-alpha.2" +strict_encoding = "0.9.0-rc.1" bitcoin_hd = { version = "0.9.0-alpha.1", path = "../hd" } descriptors = { version = "0.9.0-alpha.1", path = "../descriptors", optional = true } miniscript = { version = "9.0.0", optional = true } diff --git a/psbt/Cargo.toml b/psbt/Cargo.toml index dcd4cde..e81df5e 100644 --- a/psbt/Cargo.toml +++ b/psbt/Cargo.toml @@ -15,21 +15,20 @@ exclude = [] [dependencies] amplify = "3.13.0" -strict_encoding = "2.0.0-alpha.2" -confined_encoding = "0.9.0-alpha.2" -commit_verify = "0.9.0-alpha.1" +strict_encoding = "0.9.0-rc.1" +commit_verify = "0.9.0-rc.1" bitcoin = { version = "0.29.2", features = ["base64"] } -bitcoin_scripts = "0.9.0-alpha.3" -bitcoin_blockchain = "0.9.0-alpha.1" +bitcoin_scripts = "0.9.0-rc.1" +bitcoin_blockchain = "0.9.0-rc.1" bitcoin_hd = { version = "0.9.0-alpha.1", path = "../hd" } bitcoin_onchain = { version = "0.9.0-alpha.1", path = "../onchain" } descriptors = { version = "0.9.0-alpha.1", path = "../descriptors", optional = true } miniscript = { version = "9.0.0", optional = true } serde_crate = { package = "serde", version = "1", optional = true } -serde_with = { version = "1.12", features = ["hex"], optional = true } +serde_with = { version = "1.14", features = ["hex"], optional = true } [dev-dependencies] -strict_encoding_test = "2.0.0-alpha.1" +strict_encoding_test = "0.9.0-rc.1" [features] default = [] diff --git a/psbt/src/commit/tapret.rs b/psbt/src/commit/tapret.rs index 0c3509a..d77aced 100644 --- a/psbt/src/commit/tapret.rs +++ b/psbt/src/commit/tapret.rs @@ -23,7 +23,7 @@ use amplify::Slice32; use bitcoin_scripts::taproot::DfsPath; -use confined_encoding::{ConfinedDecode, ConfinedEncode}; +use strict_encoding::{StrictDecode, StrictEncode}; use crate::raw::ProprietaryKey; use crate::Output; @@ -102,7 +102,7 @@ pub enum TapretKeyError { TapretProhibited, /// The key contains invalid value - #[from(confined_encoding::Error)] + #[from(strict_encoding::Error)] InvalidKeyValue, } @@ -135,7 +135,7 @@ impl Output { pub fn tapret_dfs_path(&self) -> Option> { self.proprietary .get(&ProprietaryKey::tapret_host()) - .map(|data| DfsPath::confined_deserialize(data).map_err(|_| DfsPathEncodeError)) + .map(|data| DfsPath::strict_deserialize(data).map_err(|_| DfsPathEncodeError)) } /// Sets information on the specific path within taproot script tree which @@ -153,7 +153,7 @@ impl Output { self.proprietary.insert( ProprietaryKey::tapret_host(), - path.confined_serialize() + path.strict_serialize() .expect("DFS paths are always compact and serializable"), ); @@ -201,7 +201,7 @@ impl Output { pub fn set_tapret_commitment( &mut self, commitment: impl Into<[u8; 32]>, - proof: &impl ConfinedEncode, + proof: &impl StrictEncode, ) -> Result<(), TapretKeyError> { if !self.is_tapret_host() { return Err(TapretKeyError::TapretProhibited); @@ -217,7 +217,7 @@ impl Output { ); self.proprietary - .insert(ProprietaryKey::tapret_proof(), proof.confined_serialize()?); + .insert(ProprietaryKey::tapret_proof(), proof.strict_serialize()?); Ok(()) } @@ -248,11 +248,11 @@ impl Output { /// current crate. pub fn tapret_proof(&self) -> Result, TapretKeyError> where - T: ConfinedDecode, + T: StrictDecode, { self.proprietary .get(&ProprietaryKey::tapret_proof()) - .map(T::confined_deserialize) + .map(T::strict_deserialize) .transpose() .map_err(TapretKeyError::from) } diff --git a/slip132/Cargo.toml b/slip132/Cargo.toml index d5774fa..dbca0e9 100644 --- a/slip132/Cargo.toml +++ b/slip132/Cargo.toml @@ -20,7 +20,7 @@ path = "src/lib.rs" [dependencies] amplify = "3.13.0" bitcoin = "0.29.2" -strict_encoding = { version = "2.0.0-alpha.2", optional = true } +strict_encoding = { version = "0.9.0-rc.1", optional = true } serde_crate = { package = "serde", version = "1", features = ["derive"], optional = true } serde_with = { version = "1.5", features = ["hex"], optional = true }