From 1295900bf39d0e9d2c310b1994b1eb17ecc86c5d Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 14 May 2023 17:48:06 +0200 Subject: [PATCH 01/10] stl: update dependencies --- Cargo.lock | 17 +++++++---------- Cargo.toml | 4 ++++ commit_verify/Cargo.toml | 6 +++--- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 683747e4..3ddda9f1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -130,9 +130,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "baid58" -version = "0.2.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a05192bd44b6cced6d9f89b98d82fba5d1df844332e34d4888ec6ba5b28a487" +checksum = "5dce38f6b284b55ab61c1efe2143ac5ca2fcc6090536884e55921f4e002894de" dependencies = [ "base58", "blake3", @@ -656,9 +656,8 @@ dependencies = [ [[package]] name = "strict_encoding" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21201d9c01000d4a5e715a3f0b04eeea265a57a3557c06c5408d1a4471acb414" +version = "2.1.2" +source = "git+https://github.com/strict-types/strict-encoding?branch=stl#0d32aba467008cba86421bc4bc209c8b59aed3ec" dependencies = [ "amplify", "half", @@ -668,8 +667,7 @@ dependencies = [ [[package]] name = "strict_encoding_derive" version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f5adae55367464f5a229bfd539682c94f870b98a220be6e61dc43f85d612e7e" +source = "git+https://github.com/strict-types/strict-encoding?branch=stl#0d32aba467008cba86421bc4bc209c8b59aed3ec" dependencies = [ "amplify_syn", "heck", @@ -680,9 +678,8 @@ dependencies = [ [[package]] name = "strict_types" -version = "1.0.0-rc.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "371701e525f77661673ef2dca749793000162c28eb9745e69499653f61f6a9e2" +version = "1.1.1" +source = "git+https://github.com/strict-types/strict-types?branch=fix/typesys-builder#9d4e4ac6684b0c1f0c9114e920cb4c2c6dad86f6" dependencies = [ "amplify", "baid58", diff --git a/Cargo.toml b/Cargo.toml index cea2e185..42ddba4e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,3 +54,7 @@ serde = ["serde_crate", "commit_verify/serde"] [package.metadata.docs.rs] features = [ "all" ] + +[patch.crates-io] +strict_encoding = { git = "https://github.com/strict-types/strict-encoding", branch = "stl" } +strict_types = { git = "https://github.com/strict-types/strict-types", branch = "fix/typesys-builder" } diff --git a/commit_verify/Cargo.toml b/commit_verify/Cargo.toml index 0551bc8a..964aa9bf 100644 --- a/commit_verify/Cargo.toml +++ b/commit_verify/Cargo.toml @@ -22,10 +22,10 @@ name = "commit-stl" required-features = ["stl"] [dependencies] -amplify = { version = "4.0.0-beta.20", features = ["hex", "apfloat"] } +amplify = { version = "4.0.0", features = ["hex", "apfloat"] } commit_encoding_derive = { version = "0.10.0-beta.1", path = "derive" } -strict_encoding = "2.0.0" -strict_types = { version = "1.0.0-rc.1", optional = true } +strict_encoding = "2.1.2" +strict_types = { version = "1.1.1", optional = true } rand = { version = "0.8.5", optional = true } serde_crate = { version = "1.0", package = "serde", optional = true } From 40695650f169969df7f92e4026b90b37dc604b8c Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 14 May 2023 18:03:16 +0200 Subject: [PATCH 02/10] commit: add stl module generating type library --- Cargo.lock | 2 +- commit_verify/src/bin/commit-stl.rs | 14 ++------ commit_verify/src/lib.rs | 2 ++ commit_verify/src/stl.rs | 53 +++++++++++++++++++++++++++++ 4 files changed, 58 insertions(+), 13 deletions(-) create mode 100644 commit_verify/src/stl.rs diff --git a/Cargo.lock b/Cargo.lock index 3ddda9f1..b978e662 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -679,7 +679,7 @@ dependencies = [ [[package]] name = "strict_types" version = "1.1.1" -source = "git+https://github.com/strict-types/strict-types?branch=fix/typesys-builder#9d4e4ac6684b0c1f0c9114e920cb4c2c6dad86f6" +source = "git+https://github.com/strict-types/strict-types?branch=fix/typesys-builder#bb052033aba89877b1ecef9012bff5c2a55f3e7f" dependencies = [ "amplify", "baid58", diff --git a/commit_verify/src/bin/commit-stl.rs b/commit_verify/src/bin/commit-stl.rs index 591521d4..0549dcc0 100644 --- a/commit_verify/src/bin/commit-stl.rs +++ b/commit_verify/src/bin/commit-stl.rs @@ -12,27 +12,17 @@ // You should have received a copy of the Apache 2.0 License along with this // software. If not, see . -#[macro_use] -extern crate amplify; -#[macro_use] -extern crate strict_types; - use std::io::stdout; use std::{env, fs, io}; use amplify::num::u24; -use commit_verify::{mpc, LIB_NAME_COMMIT_VERIFY}; +use commit_verify::stl; use strict_encoding::{StrictEncode, StrictWriter}; -use strict_types::typelib::LibBuilder; fn main() -> Result<(), Box> { let args: Vec = env::args().collect(); - let lib = LibBuilder::new(libname!(LIB_NAME_COMMIT_VERIFY)) - .process::()? - .process::()? - .process::()? - .compile(none!())?; + let lib = stl::commit_verify_stl(); let id = lib.id(); let ext = match args.get(1).map(String::as_str) { diff --git a/commit_verify/src/lib.rs b/commit_verify/src/lib.rs index afe109c0..f75ddefd 100644 --- a/commit_verify/src/lib.rs +++ b/commit_verify/src/lib.rs @@ -51,6 +51,8 @@ mod convolve; pub(self) mod embed; mod encode; mod id; +#[cfg(feature = "stl")] +pub mod stl; pub mod merkle; pub mod mpc; diff --git a/commit_verify/src/stl.rs b/commit_verify/src/stl.rs new file mode 100644 index 00000000..35e1ad56 --- /dev/null +++ b/commit_verify/src/stl.rs @@ -0,0 +1,53 @@ +// Client-side-validation foundation libraries. +// +// SPDX-License-Identifier: Apache-2.0 +// +// Written in 2019-2023 by +// Dr. Maxim Orlovsky +// +// Copyright (C) 2019-2023 LNP/BP Standards Association. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use strict_types::typelib::{LibBuilder, TranslateError}; +use strict_types::TypeLib; + +use crate::{mpc, LIB_NAME_COMMIT_VERIFY}; + +pub const LIB_ID_COMMIT_VERIFY: &str = + "colony_janet_sharon_GqMjw3inQ2SqTJ7moaxrGkTTsGgf5GZ6FxnDiCSToa9R"; + +fn _commit_verify_stl() -> Result { + LibBuilder::new(libname!(LIB_NAME_COMMIT_VERIFY)) + .transpile::() + .transpile::() + .transpile::() + .compile(bset! { + strict_types::stl::std_stl().to_dependency() + }) +} + +pub fn commit_verify_stl() -> TypeLib { + _commit_verify_stl().expect("invalid strict type CommitVerify library") +} + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn lib_id() { + let lib = commit_verify_stl(); + assert_eq!(lib.id().to_string(), LIB_ID_COMMIT_VERIFY); + } +} From f7bc9be465429695d2292f28399f53f18f9f65bd Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 14 May 2023 20:29:46 +0200 Subject: [PATCH 03/10] stl: refactor to use new stl generator and formats --- Cargo.lock | 2 +- commit_verify/src/bin/commit-stl.rs | 62 ++++-------------- scripts/typelib.sh | 2 +- stl/CommitVerify.asc.stl | 22 ------- stl/CommitVerify@0.1.0.sta | 28 ++++++++ ...ommitVerify.stl => CommitVerify@0.1.0.stl} | Bin 835 -> 862 bytes ...ommitVerify.sty => CommitVerify@0.1.0.sty} | 29 ++++---- 7 files changed, 59 insertions(+), 86 deletions(-) delete mode 100644 stl/CommitVerify.asc.stl create mode 100644 stl/CommitVerify@0.1.0.sta rename stl/{CommitVerify.stl => CommitVerify@0.1.0.stl} (53%) rename stl/{CommitVerify.sty => CommitVerify@0.1.0.sty} (58%) diff --git a/Cargo.lock b/Cargo.lock index b978e662..e2c603d5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -679,7 +679,7 @@ dependencies = [ [[package]] name = "strict_types" version = "1.1.1" -source = "git+https://github.com/strict-types/strict-types?branch=fix/typesys-builder#bb052033aba89877b1ecef9012bff5c2a55f3e7f" +source = "git+https://github.com/strict-types/strict-types?branch=fix/typesys-builder#649eface5c47a117ff443bfac7ba70a73de2ba27" dependencies = [ "amplify", "baid58", diff --git a/commit_verify/src/bin/commit-stl.rs b/commit_verify/src/bin/commit-stl.rs index 0549dcc0..a110722d 100644 --- a/commit_verify/src/bin/commit-stl.rs +++ b/commit_verify/src/bin/commit-stl.rs @@ -12,57 +12,23 @@ // You should have received a copy of the Apache 2.0 License along with this // software. If not, see . -use std::io::stdout; -use std::{env, fs, io}; - -use amplify::num::u24; use commit_verify::stl; -use strict_encoding::{StrictEncode, StrictWriter}; - -fn main() -> Result<(), Box> { - let args: Vec = env::args().collect(); +use strict_types::typelib::parse_args; +fn main() { let lib = stl::commit_verify_stl(); - let id = lib.id(); - - let ext = match args.get(1).map(String::as_str) { - Some("--stl") => "stl", - Some("--asc") => "asc.stl", - Some("--sty") => "sty", - _ => "sty", - }; - let filename = args - .get(2) - .cloned() - .unwrap_or_else(|| format!("stl/CommitVerify.{ext}")); - let mut file = match args.len() { - 1 => Box::new(stdout()) as Box, - 2 | 3 => Box::new(fs::File::create(filename)?) as Box, - _ => panic!("invalid argument count"), - }; - match ext { - "stl" => { - lib.strict_encode(StrictWriter::with(u24::MAX.into_usize(), file))?; - } - "asc.stl" => { - writeln!(file, "{lib:X}")?; - } - _ => { - writeln!( - file, - "{{- - Id: {id:+} - Name: CommitVerify - Description: Types for client-side-validation commits and verification + let (format, dir) = parse_args(); + lib.serialize( + format, + dir, + "0.1.0", + Some( + " + Description: Client-side-validation deterministic commitments Author: Dr Maxim Orlovsky Copyright (C) 2023 LNP/BP Standards Association. All rights reserved. - License: Apache-2.0 --}} -" - )?; - writeln!(file, "{lib}")?; - } - } - - Ok(()) + License: Apache-2.0", + ), + ) + .expect("unable to write to the file"); } diff --git a/scripts/typelib.sh b/scripts/typelib.sh index 01c6386c..2a16acc8 100755 --- a/scripts/typelib.sh +++ b/scripts/typelib.sh @@ -2,4 +2,4 @@ cargo run --features stl --package commit_verify --bin commit-stl -- --stl cargo run --features stl --package commit_verify --bin commit-stl -- --sty -cargo run --features stl --package commit_verify --bin commit-stl -- --asc +cargo run --features stl --package commit_verify --bin commit-stl -- --sta diff --git a/stl/CommitVerify.asc.stl b/stl/CommitVerify.asc.stl deleted file mode 100644 index ffa42c60..00000000 --- a/stl/CommitVerify.asc.stl +++ /dev/null @@ -1,22 +0,0 @@ ------ BEGIN STRICT TYPE LIB ----- -Id: CPr8tcdPqWZ3KP8dXNPYavTEkbn8PG7CoJHtfwDFKRHJ -Checksum: texas-year-ethnic - -DENvbW1pdFZlcmlmeQAHAAtNZXJrbGVCbG9jawYDBWRlcHRoAgJVNAZTdGRMaWIhpFMf7kMeuMf8 -AW1Ij/sCkRHSiPV5E5YS8PYOK7GEDQxjcm9zc1NlY3Rpb24ACAEIVHJlZU5vZGXnW6tVnPCOCtth -gDDxXpOybtF+nalb8QrZNX/cmWpxegAAAAAAAAAA//8AAAAAAAAHZW50cm9weQAEAgAEbm9uZQAA -AAEEc29tZQAFAQAACApNZXJrbGVOb2RlBQEABwAAASAAC01lcmtsZVByb29mBgIDcG9zAAACBHBh -dGgACAEKTWVya2xlTm9kZby8z2D+C0dmO9nQwHhXA6LCb3g6FzAL1U1FyuxT9c0LAAAAAAAAAAD/ -/wAAAAAAAApNZXJrbGVUcmVlBgQFZGVwdGgCAlU0BlN0ZExpYiGkUx/uQx64x/wBbUiP+wKREdKI -9XkTlhLw9g4rsYQNB2VudHJvcHkAAAgIbWVzc2FnZXMACgcgAAEHTWVzc2FnZRysYiJWtk1YI4E6 -mezaGvj3xPVPV5iYPZyicioWB2/4AAAAAAAAAAD//wAAAAAAAANtYXAACgACAAUCAQpQcm90b2Nv -bElknc+SH8WD7+3nXBQ1v7ekAvLOkGvtbgzXWiqM439D8Y4BB01lc3NhZ2UcrGIiVrZNWCOBOpns -2hr498T1T1eYmD2conIqFgdv+AAAAAAAAAAA//8AAAAAAAAHTWVzc2FnZQUBAAcAAAEgAApQcm90 -b2NvbElkBQEABwAAASAACFRyZWVOb2RlBAIADWNvbmNlYWxlZE5vZGUABgIFZGVwdGgCAlU0BlN0 -ZExpYiGkUx/uQx64x/wBbUiP+wKREdKI9XkTlhLw9g4rsYQNBGhhc2gBCk1lcmtsZU5vZGW8vM9g -/gtHZjvZ0MB4VwOiwm94OhcwC9VNRcrsU/XNCwEOY29tbWl0bWVudExlYWYABgIKcHJvdG9jb2xJ -ZAEKUHJvdG9jb2xJZJ3Pkh/Fg+/t51wUNb+3pALyzpBr7W4M11oqjON/Q/GOB21lc3NhZ2UBB01l -c3NhZ2UcrGIiVrZNWCOBOpns2hr498T1T1eYmD2conIqFgdv+A== - ------ END STRICT TYPE LIB ----- - diff --git a/stl/CommitVerify@0.1.0.sta b/stl/CommitVerify@0.1.0.sta new file mode 100644 index 00000000..11531f73 --- /dev/null +++ b/stl/CommitVerify@0.1.0.sta @@ -0,0 +1,28 @@ +-----BEGIN STRICT TYPE LIB----- +Id: colony_janet_sharon_GqMjw3inQ2SqTJ7moaxrGkTTsGgf5GZ6FxnDiCSToa9R +Name: CommitVerify +Dependencies: + Std@quota_conan_fashion_3TZmAPf8EkQZnbGS1g8uMGes6jEWPqNkFB6pLUKeoefg + +DENvbW1pdFZlcmlmeQEkhYSxoxven3UeExRBtABs37rRoj+RaIYnGgNPOFqz9wNT +dGQHAAtNZXJrbGVCbG9jawYDBWRlcHRoAgJ1NANTdGSniKNtbjXJRbIkhpFl8oRH +EXhPVba0hLLyHzU5cXCthAxjcm9zc1NlY3Rpb24ACAEIVHJlZU5vZGVyXXqf7SwK +sOahJXm/Z3FzL6auOFoNzRdDrZwG2f2WOgAAAAAAAAAA//8AAAAAAAAHZW50cm9w +eQAEAgAEbm9uZQAAAAEEc29tZQAFAQAACApNZXJrbGVOb2RlBQEABwAAASAAC01l +cmtsZVByb29mBgIDcG9zAAACBHBhdGgACAEKTWVya2xlTm9kZby8z2D+C0dmO9nQ +wHhXA6LCb3g6FzAL1U1FyuxT9c0LAAAAAAAAAAD//wAAAAAAAApNZXJrbGVUcmVl +BgQFZGVwdGgCAnU0A1N0ZKeIo21uNclFsiSGkWXyhEcReE9VtrSEsvIfNTlxcK2E +B2VudHJvcHkAAAgIbWVzc2FnZXMACgcgAAEHTWVzc2FnZRysYiJWtk1YI4E6meza +Gvj3xPVPV5iYPZyicioWB2/4AAAAAAAAAAD//wAAAAAAAANtYXAACgACAAUCAQpQ +cm90b2NvbElknc+SH8WD7+3nXBQ1v7ekAvLOkGvtbgzXWiqM439D8Y4BB01lc3Nh +Z2UcrGIiVrZNWCOBOpns2hr498T1T1eYmD2conIqFgdv+AAAAAAAAAAA//8AAAAA +AAAHTWVzc2FnZQUBAAcAAAEgAApQcm90b2NvbElkBQEABwAAASAACFRyZWVOb2Rl +BAIADWNvbmNlYWxlZE5vZGUABgIFZGVwdGgCAnU0A1N0ZKeIo21uNclFsiSGkWXy +hEcReE9VtrSEsvIfNTlxcK2EBGhhc2gBCk1lcmtsZU5vZGW8vM9g/gtHZjvZ0MB4 +VwOiwm94OhcwC9VNRcrsU/XNCwEOY29tbWl0bWVudExlYWYABgIKcHJvdG9jb2xJ +ZAEKUHJvdG9jb2xJZJ3Pkh/Fg+/t51wUNb+3pALyzpBr7W4M11oqjON/Q/GOB21l +c3NhZ2UBB01lc3NhZ2UcrGIiVrZNWCOBOpns2hr498T1T1eYmD2conIqFgdv+A== + + +-----END STRICT TYPE LIB----- + diff --git a/stl/CommitVerify.stl b/stl/CommitVerify@0.1.0.stl similarity index 53% rename from stl/CommitVerify.stl rename to stl/CommitVerify@0.1.0.stl index a8d68a522345211082c695e24336001bbe3d0bab..1461407671be3284eef2691dba8d5ae4307d95c4 100644 GIT binary patch delta 223 zcmX@ic8|@7$2mVYH?t%xwJ0;Kl2N6#W#eM$d-F@>ghd>;Fy!3db#amX#Edp|DQ16* zsLkJ*gG*8-@=2(bnt)i#I~M2WnVxjrq|!Dq^;3(xV1<9^wk<82KFOO}78a~+ndmR6 zP!wA=|E&(!hGz>^EBB`t7V9rtXA#AFR@`~*9JZT(r&&$x*hr*lo0AxM7>QInc{D0r#kYo+isp%35qv^Tc!PArgAcpkkvbk2u9uG@(X z1|Q=lZ_2w^H+N<9N3NTu^>=1w6;@4Lxlxm712;D?@-XTVt(+wzu{dKgC!@~f$4u1# D<1Jk9 diff --git a/stl/CommitVerify.sty b/stl/CommitVerify@0.1.0.sty similarity index 58% rename from stl/CommitVerify.sty rename to stl/CommitVerify@0.1.0.sty index 5a9c39f5..90ca9699 100644 --- a/stl/CommitVerify.sty +++ b/stl/CommitVerify@0.1.0.sty @@ -1,28 +1,29 @@ {- - Id: texas_year_ethnic_CPr8tcdPqWZ3KP8dXNPYavTEkbn8PG7CoJHtfwDFKRHJ + Id: colony_janet_sharon_GqMjw3inQ2SqTJ7moaxrGkTTsGgf5GZ6FxnDiCSToa9R Name: CommitVerify - Description: Types for client-side-validation commits and verification + Version: 0.1.0 + Description: Client-side-validation deterministic commitments Author: Dr Maxim Orlovsky Copyright (C) 2023 LNP/BP Standards Association. All rights reserved. License: Apache-2.0 -} -typelib CommitVerify +typelib CommitVerify -- colony_janet_sharon_GqMjw3inQ2SqTJ7moaxrGkTTsGgf5GZ6FxnDiCSToa9R -data Message :: [U8 ^ 32] -data ProtocolId :: [U8 ^ 32] -data MerkleNode :: [U8 ^ 32] +import quota_conan_fashion_3TZmAPf8EkQZnbGS1g8uMGes6jEWPqNkFB6pLUKeoefg as Std -data TreeNode :: concealedNode (depth StdLib.U4, hash MerkleNode) - | commitmentLeaf (protocolId ProtocolId, message Message) -data MerkleTree :: depth StdLib.U4 +data MerkleBlock :: depth Std.u4 + , crossSection [TreeNode] + , entropy U64? +data MerkleNode :: [U8 ^ 32] +data MerkleProof :: pos U16, path [MerkleNode] +data MerkleTree :: depth Std.u4 , entropy U64 , messages {[Byte ^ 32] -> Message} , map {U16 -> ProtocolId, Message} +data Message :: [U8 ^ 32] +data ProtocolId :: [U8 ^ 32] +data TreeNode :: concealedNode (depth Std.u4, hash MerkleNode) + | commitmentLeaf (protocolId ProtocolId, message Message) -data MerkleBlock :: depth StdLib.U4 - , crossSection [TreeNode] - , entropy U64? - -data MerkleProof :: pos U16, path [MerkleNode] From a89eb7f61fc0abedd5d6174800286cc255dd8ec2 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 14 May 2023 20:49:35 +0200 Subject: [PATCH 04/10] stl: update to fixed U4/[Byte^32] encoding --- Cargo.lock | 4 ++-- stl/CommitVerify@0.1.0.sta | 36 ++++++++++++++++++------------------ stl/CommitVerify@0.1.0.stl | Bin 862 -> 862 bytes stl/CommitVerify@0.1.0.sty | 16 ++++++++-------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e2c603d5..27a89187 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -657,7 +657,7 @@ dependencies = [ [[package]] name = "strict_encoding" version = "2.1.2" -source = "git+https://github.com/strict-types/strict-encoding?branch=stl#0d32aba467008cba86421bc4bc209c8b59aed3ec" +source = "git+https://github.com/strict-types/strict-encoding?branch=stl#09c260290112897b913a1fe025bb9c12c73785dd" dependencies = [ "amplify", "half", @@ -667,7 +667,7 @@ dependencies = [ [[package]] name = "strict_encoding_derive" version = "2.0.0" -source = "git+https://github.com/strict-types/strict-encoding?branch=stl#0d32aba467008cba86421bc4bc209c8b59aed3ec" +source = "git+https://github.com/strict-types/strict-encoding?branch=stl#09c260290112897b913a1fe025bb9c12c73785dd" dependencies = [ "amplify_syn", "heck", diff --git a/stl/CommitVerify@0.1.0.sta b/stl/CommitVerify@0.1.0.sta index 11531f73..b59de8c7 100644 --- a/stl/CommitVerify@0.1.0.sta +++ b/stl/CommitVerify@0.1.0.sta @@ -1,27 +1,27 @@ -----BEGIN STRICT TYPE LIB----- -Id: colony_janet_sharon_GqMjw3inQ2SqTJ7moaxrGkTTsGgf5GZ6FxnDiCSToa9R +Id: expand_vertigo_billy_HmAmKqZJ7XKDsyamyaikTq3PXzWgWcuVMXwe13Hzxfq4 Name: CommitVerify Dependencies: Std@quota_conan_fashion_3TZmAPf8EkQZnbGS1g8uMGes6jEWPqNkFB6pLUKeoefg DENvbW1pdFZlcmlmeQEkhYSxoxven3UeExRBtABs37rRoj+RaIYnGgNPOFqz9wNT -dGQHAAtNZXJrbGVCbG9jawYDBWRlcHRoAgJ1NANTdGSniKNtbjXJRbIkhpFl8oRH -EXhPVba0hLLyHzU5cXCthAxjcm9zc1NlY3Rpb24ACAEIVHJlZU5vZGVyXXqf7SwK -sOahJXm/Z3FzL6auOFoNzRdDrZwG2f2WOgAAAAAAAAAA//8AAAAAAAAHZW50cm9w -eQAEAgAEbm9uZQAAAAEEc29tZQAFAQAACApNZXJrbGVOb2RlBQEABwAAASAAC01l -cmtsZVByb29mBgIDcG9zAAACBHBhdGgACAEKTWVya2xlTm9kZby8z2D+C0dmO9nQ -wHhXA6LCb3g6FzAL1U1FyuxT9c0LAAAAAAAAAAD//wAAAAAAAApNZXJrbGVUcmVl -BgQFZGVwdGgCAnU0A1N0ZKeIo21uNclFsiSGkWXyhEcReE9VtrSEsvIfNTlxcK2E -B2VudHJvcHkAAAgIbWVzc2FnZXMACgcgAAEHTWVzc2FnZRysYiJWtk1YI4E6meza -Gvj3xPVPV5iYPZyicioWB2/4AAAAAAAAAAD//wAAAAAAAANtYXAACgACAAUCAQpQ -cm90b2NvbElknc+SH8WD7+3nXBQ1v7ekAvLOkGvtbgzXWiqM439D8Y4BB01lc3Nh -Z2UcrGIiVrZNWCOBOpns2hr498T1T1eYmD2conIqFgdv+AAAAAAAAAAA//8AAAAA -AAAHTWVzc2FnZQUBAAcAAAEgAApQcm90b2NvbElkBQEABwAAASAACFRyZWVOb2Rl -BAIADWNvbmNlYWxlZE5vZGUABgIFZGVwdGgCAnU0A1N0ZKeIo21uNclFsiSGkWXy -hEcReE9VtrSEsvIfNTlxcK2EBGhhc2gBCk1lcmtsZU5vZGW8vM9g/gtHZjvZ0MB4 -VwOiwm94OhcwC9VNRcrsU/XNCwEOY29tbWl0bWVudExlYWYABgIKcHJvdG9jb2xJ -ZAEKUHJvdG9jb2xJZJ3Pkh/Fg+/t51wUNb+3pALyzpBr7W4M11oqjON/Q/GOB21l -c3NhZ2UBB01lc3NhZ2UcrGIiVrZNWCOBOpns2hr498T1T1eYmD2conIqFgdv+A== +dGQHAAtNZXJrbGVCbG9jawYDBWRlcHRoAgJVNANTdGSniKNtbjXJRbIkhpFl8oRH +EXhPVba0hLLyHzU5cXCthAxjcm9zc1NlY3Rpb24ACAEIVHJlZU5vZGW86hfSc7IB +QzBDrYWweQS8Odm/gvvYoZJaFdIrSZVGIwAAAAAAAAAA//8AAAAAAAAHZW50cm9w +eQAEAgAEbm9uZQAAAAEEc29tZQAFAQAACApNZXJrbGVOb2RlBQEABwAAQCAAC01l +cmtsZVByb29mBgIDcG9zAAACBHBhdGgACAEKTWVya2xlTm9kZY9JHIljSS/G/SOo +WUugR7vCS6bfYMS9cphJ3bPOsZXwAAAAAAAAAAD//wAAAAAAAApNZXJrbGVUcmVl +BgQFZGVwdGgCAlU0A1N0ZKeIo21uNclFsiSGkWXyhEcReE9VtrSEsvIfNTlxcK2E +B2VudHJvcHkAAAgIbWVzc2FnZXMACgcgAAEHTWVzc2FnZRQYwtY4UQTbtrXnnT9m +mESVV7Qc5zMby9yhP42m8S+CAAAAAAAAAAD//wAAAAAAAANtYXAACgACAAUCAQpQ +cm90b2NvbElkMCC4MEdDi82q2QhwVi/vZet0wC8WGQXUViMEeTgEFVYBB01lc3Nh +Z2UUGMLWOFEE27a1550/ZphElVe0HOczG8vcoT+NpvEvggAAAAAAAAAA//8AAAAA +AAAHTWVzc2FnZQUBAAcAAEAgAApQcm90b2NvbElkBQEABwAAQCAACFRyZWVOb2Rl +BAIADWNvbmNlYWxlZE5vZGUABgIFZGVwdGgCAlU0A1N0ZKeIo21uNclFsiSGkWXy +hEcReE9VtrSEsvIfNTlxcK2EBGhhc2gBCk1lcmtsZU5vZGWPSRyJY0kvxv0jqFlL +oEe7wkum32DEvXKYSd2zzrGV8AEOY29tbWl0bWVudExlYWYABgIKcHJvdG9jb2xJ +ZAEKUHJvdG9jb2xJZDAguDBHQ4vNqtkIcFYv72XrdMAvFhkF1FYjBHk4BBVWB21l +c3NhZ2UBB01lc3NhZ2UUGMLWOFEE27a1550/ZphElVe0HOczG8vcoT+NpvEvgg== -----END STRICT TYPE LIB----- diff --git a/stl/CommitVerify@0.1.0.stl b/stl/CommitVerify@0.1.0.stl index 1461407671be3284eef2691dba8d5ae4307d95c4..24680ecd5467d6dcd730a307f72b33d1960405b9 100644 GIT binary patch delta 380 zcmcb|c8_g>7h~w;UMAIv1(FJTUWs2S-o)r^;JmhVLnX@|%bWX~e&1L)DN6K`w&zqg z<%ugD8676R)>7#Al<7?N)IauDc}1l60{7jAyqDciII_2BhUeYQ=Qd9LFxiw*6=Lk< z21X?X5s5?BECN|>Z`=BOu6^1Jm#N`fWS$#KpT4uuzIWM2{iex>7}YZj6m}T6J9nR5 zb(5nYO#glA>yiWdVv?*^!jxGmEm%au7}I00sa5Ll`i9tc(oo3=9sF h1DS*w9VVwTse@f;M%XitnY024xsE*-;y9vR2>^I0oR$Cp delta 380 zcmcb|c8_g>7h~zTqp%wotWle|llD{<3uzQM_lxo!8D`yZLvT z)x?#KjEoasYbos6b3Wl8w|koP%?k%A!kHHx%CE2zH{ibN>w4-<@Yl24lT8^_A;wN_ zU{q3&S(Bs`w#_#}xzTFon_E&pz90GOA3kG-?VLqLT4L<^KPDeyRL_`uev}$H?xRT3no%o=V6x1}OOdAHsm?V`XGuXJBBQ h9LOZh$T&HbNgeD$Gs2#E%%l}a$aU Message} , map {U16 -> ProtocolId, Message} -data Message :: [U8 ^ 32] -data ProtocolId :: [U8 ^ 32] -data TreeNode :: concealedNode (depth Std.u4, hash MerkleNode) +data Message :: [Byte ^ 32] +data ProtocolId :: [Byte ^ 32] +data TreeNode :: concealedNode (depth Std.U4, hash MerkleNode) | commitmentLeaf (protocolId ProtocolId, message Message) From 4a136cac86576a551419e63a89c60fa931e54c81 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 14 May 2023 20:56:26 +0200 Subject: [PATCH 05/10] stl: add top-level crate features --- Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 42ddba4e..8ea4d0eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,8 @@ serde_crate = { package = "serde", version = "1", features = ["derive"], optiona [features] default = ["derive"] -all = ["serde", "rand", "async"] +all = ["serde", "rand", "async", "stl"] +stl = ["commit_verify/stl"] async = ["single_use_seals/async"] rand = ["commit_verify/rand"] derive = ["commit_verify/derive"] From fd881ecc9a9d1ae7e391c8e49b62a9b7652f03d3 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 14 May 2023 21:02:05 +0200 Subject: [PATCH 06/10] chore: fix docs --- commit_verify/derive/src/lib.rs | 20 ++++++++++---------- commit_verify/src/encode.rs | 4 ++-- commit_verify/src/id.rs | 2 +- src/lib.rs | 2 ++ 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/commit_verify/derive/src/lib.rs b/commit_verify/derive/src/lib.rs index 1a6409a5..ab6aa2ee 100644 --- a/commit_verify/derive/src/lib.rs +++ b/commit_verify/derive/src/lib.rs @@ -22,27 +22,27 @@ // Coding conventions #![recursion_limit = "256"] -//! Derivation macros for strict encoding. To learn more about the strict -//! encoding please check `strict_encoding` crate. +//! Derivation macros for commit encoding. To learn more about the strict +//! commit please check `commit_verify` crate. //! //! # Derivation macros //! -//! Library exports derivation macros `#[derive(`[`StrictEncode`]`)]`, -//! `#[derive(`[`StrictDecode`]`)]`, which can be added on top of any structure -//! you'd like to support string encoding (see Example section below). +//! Library exports derivation macros `#[derive(`[`CommitEncode`]`)]`, +//! which can be added on top of any structure you'd like to support commitment +//! encoding. //! //! Encoding/decoding implemented by both of these macros may be configured at -//! type and individual field level using `#[strict_type(...)]` attributes. +//! type and individual field level using `#[commit_encode(...)]` attributes. //! //! # Attribute //! -//! [`StrictEncode`] and [`StrictDecode`] behavior can be customized with -//! `#[strict_encoding(...)]` attribute, which accepts different arguments -//! depending to which part of the data type it is applied. +//! [`CommitEncode`] behavior can be customized with `#[commit_encoding(...)]` +//! attribute, which accepts different arguments depending to which part of the +//! data type it is applied. //! //! ## Attribute arguments at type declaration level //! -//! Derivation macros accept `#[strict_encoding()]` attribute with the following +//! Derivation macros accept `#[commit_encoding()]` attribute with the following //! arguments: #[macro_use] diff --git a/commit_verify/src/encode.rs b/commit_verify/src/encode.rs index 859d5e77..e2f59a31 100644 --- a/commit_verify/src/encode.rs +++ b/commit_verify/src/encode.rs @@ -144,7 +144,7 @@ pub mod strategies { pub enum Strict {} /// Commits to the value data by first converting them into confidential - /// version (*concealing*) by running [`CommitConceal::commit_conceal`] + /// version (*concealing*) by running [`Conceal::conceal`] /// first and returning its result serialized with strict encoding /// rules. /// @@ -155,7 +155,7 @@ pub mod strategies { /// Commits to the value via commitment id of the type, which is serialized /// into the hasher. /// - /// Can apply only to types implementing [`CommitId`] trait. + /// Can apply only to types implementing [`CommitmentId`] trait. pub enum Id {} /// Commits to the value by merklizing data provided by [`MerkleLeaves`] diff --git a/commit_verify/src/id.rs b/commit_verify/src/id.rs index bdd8ed3a..1ba4454e 100644 --- a/commit_verify/src/id.rs +++ b/commit_verify/src/id.rs @@ -23,7 +23,7 @@ use crate::{CommitEncode, Sha256}; /// High-level API used in client-side validation for producing a single /// commitment to the data, which includes running all necessary procedures like -/// concealment with [`CommitConceal`], merklization, strict encoding, +/// concealment with [`crate::Conceal`], merklization, strict encoding, /// wrapped into [`CommitEncode`], followed by the actual commitment to its /// output. pub trait CommitmentId: CommitEncode { diff --git a/src/lib.rs b/src/lib.rs index 2dc02363..43db62f1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -46,7 +46,9 @@ //! standardizing typical workflow processes in a form of interfaces that //! will be nearly impossible to use in a wrong way. +#[allow(missing_docs)] pub extern crate commit_verify as commit; +#[allow(missing_docs)] pub extern crate single_use_seals as seals; #[cfg(feature = "serde")] From 72bfcfde70c5d235793dd1355f473171f40e125a Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 14 May 2023 21:03:12 +0200 Subject: [PATCH 07/10] stl: update lib id constant --- commit_verify/src/stl.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commit_verify/src/stl.rs b/commit_verify/src/stl.rs index 35e1ad56..6075b2d7 100644 --- a/commit_verify/src/stl.rs +++ b/commit_verify/src/stl.rs @@ -25,7 +25,7 @@ use strict_types::TypeLib; use crate::{mpc, LIB_NAME_COMMIT_VERIFY}; pub const LIB_ID_COMMIT_VERIFY: &str = - "colony_janet_sharon_GqMjw3inQ2SqTJ7moaxrGkTTsGgf5GZ6FxnDiCSToa9R"; + "expand_vertigo_billy_HmAmKqZJ7XKDsyamyaikTq3PXzWgWcuVMXwe13Hzxfq4"; fn _commit_verify_stl() -> Result { LibBuilder::new(libname!(LIB_NAME_COMMIT_VERIFY)) From 735d2897694b03399e042c4da1edc1ae8270c7fc Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 14 May 2023 21:15:43 +0200 Subject: [PATCH 08/10] chore: fix lints --- commit_verify/derive/src/params.rs | 2 +- commit_verify/derive/tests/base.rs | 2 ++ commit_verify/src/convolve.rs | 2 +- commit_verify/src/embed.rs | 4 ++-- commit_verify/src/mpc/block.rs | 2 +- commit_verify/src/mpc/tree.rs | 2 +- src/lib.rs | 4 ++-- 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/commit_verify/derive/src/params.rs b/commit_verify/derive/src/params.rs index f6fe975d..6a9cd4fb 100644 --- a/commit_verify/derive/src/params.rs +++ b/commit_verify/derive/src/params.rs @@ -74,7 +74,7 @@ impl TryFrom<&Path> for StrategyAttr { } impl StrategyAttr { - pub fn to_ident(&self) -> Ident { + pub fn to_ident(self) -> Ident { match self { StrategyAttr::CommitEncoding => { panic!("StrategyAttr::CommitEncoding must be derived manually") diff --git a/commit_verify/derive/tests/base.rs b/commit_verify/derive/tests/base.rs index 0d8bd04f..5a4bad0a 100644 --- a/commit_verify/derive/tests/base.rs +++ b/commit_verify/derive/tests/base.rs @@ -53,6 +53,7 @@ fn strategy_transparent() -> common::Result { struct ShortLen(u16); verify_commit(ShortLen(0), [0, 0]); + #[allow(clippy::mixed_case_hex_literals)] verify_commit(ShortLen(0xFFde), [0xde, 0xFF]); Ok(()) @@ -69,6 +70,7 @@ fn strategy_into_u8() -> common::Result { B, C, } + #[allow(clippy::from_over_into)] impl Into for Prim { fn into(self) -> u8 { self as u8 } } diff --git a/commit_verify/src/convolve.rs b/commit_verify/src/convolve.rs index 247f2a65..ef58ce96 100644 --- a/commit_verify/src/convolve.rs +++ b/commit_verify/src/convolve.rs @@ -73,7 +73,7 @@ where where Self: VerifyEq, { - let original = self.restore_original(&commitment); + let original = self.restore_original(commitment); let suppl = self.extract_supplement(); let (commitment_prime, proof) = original.convolve_commit(suppl, msg)?; Ok(commitment.verify_eq(&commitment_prime) && self.verify_eq(&proof)) diff --git a/commit_verify/src/embed.rs b/commit_verify/src/embed.rs index fafb5f51..e74666c7 100644 --- a/commit_verify/src/embed.rs +++ b/commit_verify/src/embed.rs @@ -155,7 +155,7 @@ where { let mut container_prime = proof.restore_original_container(self)?; let proof_prime = container_prime.embed_commit(msg)?; - Ok(proof_prime.verify_eq(&proof) && self.verify_eq(&container_prime)) + Ok(proof_prime.verify_eq(proof) && self.verify_eq(&container_prime)) } /// Phantom method used to add `Protocol` generic parameter to the trait. @@ -264,7 +264,7 @@ pub(crate) mod test_helpers { acc.iter().for_each(|commitment| { // Testing that verification against other commitments // returns `false` - assert!(!SUPPLEMENT.verify(msg, &commitment).unwrap()); + assert!(!SUPPLEMENT.verify(msg, commitment).unwrap()); }); // Detecting collision: each message should produce a unique diff --git a/commit_verify/src/mpc/block.rs b/commit_verify/src/mpc/block.rs index cd5e1030..e7f686de 100644 --- a/commit_verify/src/mpc/block.rs +++ b/commit_verify/src/mpc/block.rs @@ -132,7 +132,7 @@ impl From<&MerkleTree> for MerkleBlock { fn from(tree: &MerkleTree) -> Self { let map = &tree.map; - let iter = (0..tree.width()).into_iter().map(|pos| { + let iter = (0..tree.width()).map(|pos| { map.get(&pos) .map(|(protocol_id, message)| TreeNode::CommitmentLeaf { protocol_id: *protocol_id, diff --git a/commit_verify/src/mpc/tree.rs b/commit_verify/src/mpc/tree.rs index f9c28aa7..c6b51b28 100644 --- a/commit_verify/src/mpc/tree.rs +++ b/commit_verify/src/mpc/tree.rs @@ -60,7 +60,7 @@ impl CommitmentId for MerkleTree { impl MerkleTree { pub fn root(&self) -> MerkleNode { - let iter = (0..self.width()).into_iter().map(|pos| { + let iter = (0..self.width()).map(|pos| { self.map .get(&pos) .map(|(protocol, msg)| Leaf::inhabited(*protocol, *msg)) diff --git a/src/lib.rs b/src/lib.rs index 43db62f1..073d48a7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -46,9 +46,9 @@ //! standardizing typical workflow processes in a form of interfaces that //! will be nearly impossible to use in a wrong way. -#[allow(missing_docs)] +/// Re-export of `commit_verify` crate. pub extern crate commit_verify as commit; -#[allow(missing_docs)] +/// Re-export of `single_use_seals` crate. pub extern crate single_use_seals as seals; #[cfg(feature = "serde")] From 317d594d2c3d252bcb7d1a493cd49a04a320c3c9 Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 14 May 2023 21:16:38 +0200 Subject: [PATCH 09/10] derive: release v0.10.0 --- Cargo.lock | 2 +- commit_verify/Cargo.toml | 2 +- commit_verify/derive/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 27a89187..22200bfa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -215,7 +215,7 @@ dependencies = [ [[package]] name = "commit_encoding_derive" -version = "0.10.0-beta.1" +version = "0.10.0" dependencies = [ "amplify", "amplify_syn", diff --git a/commit_verify/Cargo.toml b/commit_verify/Cargo.toml index 964aa9bf..08a5b175 100644 --- a/commit_verify/Cargo.toml +++ b/commit_verify/Cargo.toml @@ -23,7 +23,7 @@ required-features = ["stl"] [dependencies] amplify = { version = "4.0.0", features = ["hex", "apfloat"] } -commit_encoding_derive = { version = "0.10.0-beta.1", path = "derive" } +commit_encoding_derive = { version = "0.10.0", path = "derive" } strict_encoding = "2.1.2" strict_types = { version = "1.1.1", optional = true } rand = { version = "0.8.5", optional = true } diff --git a/commit_verify/derive/Cargo.toml b/commit_verify/derive/Cargo.toml index 1e487eee..f765d644 100644 --- a/commit_verify/derive/Cargo.toml +++ b/commit_verify/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "commit_encoding_derive" -version = "0.10.0-beta.1" +version = "0.10.0" description = "Commitment encoding derivation macros" keywords = ["commitments", "proc-macro"] categories = ["development-tools", "encoding"] From d31990ca6b5bb212b399865ec32eb8e1d323db4e Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Mon, 15 May 2023 20:13:35 +0200 Subject: [PATCH 10/10] release v0.10.2 --- Cargo.lock | 17 ++++++++++------- Cargo.toml | 8 ++------ commit_verify/Cargo.toml | 6 +++--- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 22200bfa..a193470f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -206,7 +206,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "client_side_validation" -version = "0.10.1" +version = "0.10.2" dependencies = [ "commit_verify", "serde", @@ -229,7 +229,7 @@ dependencies = [ [[package]] name = "commit_verify" -version = "0.10.1" +version = "0.10.2" dependencies = [ "amplify", "commit_encoding_derive", @@ -656,8 +656,9 @@ dependencies = [ [[package]] name = "strict_encoding" -version = "2.1.2" -source = "git+https://github.com/strict-types/strict-encoding?branch=stl#09c260290112897b913a1fe025bb9c12c73785dd" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fff0b729ca136cddccc87481dd932a442133a12a490f349d67f5d4c20b421e5" dependencies = [ "amplify", "half", @@ -667,7 +668,8 @@ dependencies = [ [[package]] name = "strict_encoding_derive" version = "2.0.0" -source = "git+https://github.com/strict-types/strict-encoding?branch=stl#09c260290112897b913a1fe025bb9c12c73785dd" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f5adae55367464f5a229bfd539682c94f870b98a220be6e61dc43f85d612e7e" dependencies = [ "amplify_syn", "heck", @@ -678,8 +680,9 @@ dependencies = [ [[package]] name = "strict_types" -version = "1.1.1" -source = "git+https://github.com/strict-types/strict-types?branch=fix/typesys-builder#649eface5c47a117ff443bfac7ba70a73de2ba27" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7af86f31fce50e8e4635509b6114c71aaa3a37cb3df1b8ea0ab5d5cf58afd688" dependencies = [ "amplify", "baid58", diff --git a/Cargo.toml b/Cargo.toml index 8ea4d0eb..dddc8350 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ license = "Apache-2.0" [package] name = "client_side_validation" -version = "0.10.1" +version = "0.10.2" description = "Client-side validation foundation library" keywords = ["lnp-bp", "smart-contracts", "blockchain"] categories = ["cryptography"] @@ -40,7 +40,7 @@ name = "client_side_validation" path = "src/lib.rs" [dependencies] -commit_verify = { version = "0.10.1", path = "./commit_verify", default-features = false } +commit_verify = { version = "0.10.2", path = "./commit_verify", default-features = false } single_use_seals = { version = "0.10.0", path = "./single_use_seals" } serde_crate = { package = "serde", version = "1", features = ["derive"], optional = true } @@ -55,7 +55,3 @@ serde = ["serde_crate", "commit_verify/serde"] [package.metadata.docs.rs] features = [ "all" ] - -[patch.crates-io] -strict_encoding = { git = "https://github.com/strict-types/strict-encoding", branch = "stl" } -strict_types = { git = "https://github.com/strict-types/strict-types", branch = "fix/typesys-builder" } diff --git a/commit_verify/Cargo.toml b/commit_verify/Cargo.toml index 08a5b175..4b8ce1d0 100644 --- a/commit_verify/Cargo.toml +++ b/commit_verify/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "commit_verify" -version = "0.10.1" +version = "0.10.2" description = "Commit-verify API for client-side validation" keywords = ["lnp-bp", "smart-contracts", "blockchain", "commitments"] categories = ["cryptography"] @@ -24,8 +24,8 @@ required-features = ["stl"] [dependencies] amplify = { version = "4.0.0", features = ["hex", "apfloat"] } commit_encoding_derive = { version = "0.10.0", path = "derive" } -strict_encoding = "2.1.2" -strict_types = { version = "1.1.1", optional = true } +strict_encoding = "2.2.0" +strict_types = { version = "1.2.0", optional = true } rand = { version = "0.8.5", optional = true } serde_crate = { version = "1.0", package = "serde", optional = true }