From 18c4612b416044ee01b5ccaa4b7bca532ec7258e Mon Sep 17 00:00:00 2001 From: Dr Maxim Orlovsky Date: Sun, 28 Nov 2021 00:02:43 +0100 Subject: [PATCH] v0.5 release --- .github/workflows/build.yml | 2 +- Cargo.lock | 140 +++++++++++++++++++++--------------- Cargo.toml | 10 +-- README.md | 2 +- bech32/Cargo.toml | 4 +- chain/Cargo.toml | 8 +-- chain/src/lib.rs | 1 + elgamal/Cargo.toml | 4 +- src/bin/lnpbp.rs | 14 ++-- 9 files changed, 105 insertions(+), 80 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d1bad51b..b3e00d8b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -86,7 +86,7 @@ jobs: strategy: fail-fast: false matrix: - toolchain: [ 1.47.0 ] + toolchain: [ 1.51.0 ] steps: - uses: actions/checkout@v2 - name: Install rust ${{ matrix.toolchain }} diff --git a/Cargo.lock b/Cargo.lock index a1ccef2a..126af4c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10,9 +10,9 @@ checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" [[package]] name = "amplify" -version = "3.8.2" +version = "3.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ecf2a5a73524630dd5dd1ecde8ad6db426ecc04a28f6eb302fc145259fe6c3d" +checksum = "a8e62f231427205466fa4a9be272c5524e0781d724917f370d0ffeca95d1a9b2" dependencies = [ "amplify_derive", "amplify_num", @@ -26,9 +26,9 @@ dependencies = [ [[package]] name = "amplify_derive" -version = "2.8.3" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e8e7f1941a55e31c090297d0f3e037b91d05795baba47964d61519d92f350b" +checksum = "403008693dd8333254c9cf0f977890f23c4ceaa9975721cc52b79551a72ff7f2" dependencies = [ "amplify_syn", "proc-macro2", @@ -38,18 +38,18 @@ dependencies = [ [[package]] name = "amplify_num" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4b27aa49ed07931673f96a41998a0f8e98146c65b4be2ff1f4843f68f4e777" +checksum = "bc2f04ef9ef18297ed29418a8c5a93569ae07934234a423fd77b68a9dbd1e491" dependencies = [ "serde", ] [[package]] name = "amplify_syn" -version = "1.1.4" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf296f37a25aa9511edecc6a713361370a857d0dccd808407d7972a66cc91d6a" +checksum = "da24db1445cc7bc3842fa072c2d51fe5b25b812b6a572d65842a4c72e87221ac" dependencies = [ "proc-macro2", "quote", @@ -102,9 +102,9 @@ checksum = "cf9ff0bbfd639f15c74af777d81383cf53efb7c93613f6cab67c6c11e05bbf8b" [[package]] name = "bitcoin" -version = "0.27.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a427b27dae305157520d86673f2393b3eb08d880609abfcffc6e3c3c820e764" +checksum = "9a41df6ad9642c5c15ae312dd3d074de38fd3eb7cc87ad4ce10f90292a83fe4d" dependencies = [ "bech32", "bitcoin_hashes", @@ -135,9 +135,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.69" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" +checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" [[package]] name = "chrono" @@ -154,9 +154,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.0.0-beta.4" +version = "3.0.0-beta.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcd70aa5597dbc42f7217a543f9ef2768b2ef823ba29036072d30e1d88e98406" +checksum = "feff3878564edb93745d58cf63e17b63f24142506e7a20c87a5521ed7bfb1d63" dependencies = [ "atty", "bitflags", @@ -167,14 +167,14 @@ dependencies = [ "strsim", "termcolor", "textwrap", - "vec_map", + "unicase", ] [[package]] name = "clap_derive" -version = "3.0.0-beta.4" +version = "3.0.0-beta.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5bb0d655624a0b8770d1c178fb8ffcb1f91cc722cb08f451e3dc72465421ac" +checksum = "8b15c6b4f786ffb6192ffe65a36855bc1fc2444bcd0945ae16748dcd6ed7d0d3" dependencies = [ "heck", "proc-macro-error", @@ -243,6 +243,18 @@ version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" +[[package]] +name = "encoding_derive_helpers" +version = "1.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8af9b20816ac9126945a6ecc1e248c4a1edfeada329839cdca9c96581174bebb" +dependencies = [ + "amplify", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "fnv" version = "1.0.7" @@ -324,9 +336,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.100" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1fa8cddc8fbbee11227ef194b5317ed014b8acbf15139bd716a18ad3fe99ec5" +checksum = "8521a1b57e76b1ec69af7599e75e38e7b7fad6610f037db8c79b127201b5d119" [[package]] name = "linked-hash-map" @@ -353,7 +365,7 @@ dependencies = [ [[package]] name = "lnpbp_bech32" -version = "0.5.0-beta.2" +version = "0.5.0" dependencies = [ "amplify", "bech32", @@ -367,7 +379,7 @@ dependencies = [ [[package]] name = "lnpbp_chain" -version = "0.5.0-beta.3" +version = "0.5.0" dependencies = [ "amplify", "bitcoin", @@ -380,13 +392,19 @@ dependencies = [ [[package]] name = "lnpbp_elgamal" -version = "0.5.0-beta.1" +version = "0.5.0" dependencies = [ "amplify", "bitcoin_hashes", "secp256k1", ] +[[package]] +name = "memchr" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" + [[package]] name = "num-integer" version = "0.1.44" @@ -408,15 +426,18 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "3.1.0" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6acbef58a60fe69ab50510a55bc8cdd4d6cf2283d27ad338f54cb52747a9cf2d" +checksum = "addaa943333a514159c80c97ff4a93306530d965d27e139188283cd13e06a799" +dependencies = [ + "memchr", +] [[package]] name = "paste" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" +checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5" [[package]] name = "proc-macro-error" @@ -444,18 +465,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.28" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7ed8b8c7b886ea3ed7dde405212185f423ab44682667c8c6dd14aa1d9f6612" +checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" dependencies = [ "unicode-xid", ] [[package]] name = "quote" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" dependencies = [ "proc-macro2", ] @@ -609,18 +630,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.129" +version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1f72836d2aa753853178eda473a3b9d8e4eefdaf20523b919677e6de489f8f1" +checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.129" +version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e57ae87ad533d9a56427558b516d0adac283614e347abf85b0dc0cbbf0a249f3" +checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" dependencies = [ "proc-macro2", "quote", @@ -629,9 +650,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.66" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "336b10da19a12ad094b59d870ebde26a45402e5b470add4b5fd03c5048a32127" +checksum = "d0ffa0837f2dfa6fb90868c2b5468cad482e175f7dad97e7421951e663f2b527" dependencies = [ "itoa", "ryu", @@ -650,9 +671,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "1.9.4" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad9fdbb69badc8916db738c25efd04f0a65297d26c2f8de4b62e57b8c12bc72" +checksum = "ad6056b4cb69b6e43e3a0f055def223380baecc99da683884f205bf347f7c4b3" dependencies = [ "hex", "rustversion", @@ -662,9 +683,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "1.4.2" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1569374bd54623ec8bd592cf22ba6e03c0f177ff55fbc8c29a49e296e7adecf" +checksum = "12e47be9471c72889ebafb5e14d5ff930d89ae7a67bbdb5f8abb564f845a927e" dependencies = [ "darling", "proc-macro2", @@ -674,9 +695,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.8.19" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6375dbd828ed6964c3748e4ef6d18e7a175d408ffe184bca01698d0c73f915a9" +checksum = "d8c608a35705a5d3cdc9fbe403147647ff34b921f8e833e49306df898f9b20af" dependencies = [ "dtoa", "indexmap", @@ -686,9 +707,9 @@ dependencies = [ [[package]] name = "strict_encoding" -version = "1.6.1" +version = "1.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ec448f7e3f5261fe66ab0843d044a8ce05af4a64a833a9d72d96672b01d9e66" +checksum = "441080358b7382cf0b4766e4253a77e1ee7ad17139a4f0b950993074acfb63dc" dependencies = [ "amplify", "bitcoin", @@ -699,13 +720,13 @@ dependencies = [ [[package]] name = "strict_encoding_derive" -version = "1.5.2" +version = "1.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f8703ce3fc844e1bed7cdf3d538b292f90eb3ac41b48542a08980c517b88f8" +checksum = "4cf87ccd517175354f494683b69b7703664cf49e6b82e78ff53e42bea0c17401" dependencies = [ - "amplify", + "amplify_syn", + "encoding_derive_helpers", "proc-macro2", - "quote", "syn", ] @@ -727,9 +748,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.75" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7f58f7e8eaa0009c5fec437aabf511bd9933e4b2d7407bd05273c01a8906ea7" +checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59" dependencies = [ "proc-macro2", "quote", @@ -774,6 +795,15 @@ dependencies = [ "serde", ] +[[package]] +name = "unicase" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +dependencies = [ + "version_check", +] + [[package]] name = "unicode-segmentation" version = "1.8.0" @@ -782,9 +812,9 @@ checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" [[package]] name = "unicode-width" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" +checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" [[package]] name = "unicode-xid" @@ -792,12 +822,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version_check" version = "0.9.3" diff --git a/Cargo.toml b/Cargo.toml index 961a4057..81124ad3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,14 +23,14 @@ path = "src/bin/lnpbp.rs" required-features = ["cli"] [dependencies] -amplify = { version = "3", features = ["stringly_conversions", "std"] } -lnpbp_bech32 = { version = "0.5.0-beta.2", path = "bech32" } -lnpbp_chain = { version = "0.5.0-beta.3", path = "chain" } -lnpbp_elgamal = { version = "0.5.0-beta.1", path = "elgamal", optional = true } +amplify = { version = "3.9.1", features = ["stringly_conversions", "std"] } +lnpbp_bech32 = { version = "0.5.0", path = "bech32" } +lnpbp_chain = { version = "0.5.0", path = "chain" } +lnpbp_elgamal = { version = "0.5.0", path = "elgamal", optional = true } serde_crate = { package = "serde", version = "1", features = ["derive"], optional = true } serde_with = { version = "1.8", features = ["hex"], optional = true } # serde_with_macros = { version = "~1.2.0", optional = true } # Fix for the problem in 1.3.0 -clap = { version = "3.0.0-beta.4", optional = true } +clap = { version = "3.0.0-beta.5", optional = true } serde_yaml = { version = "0.8", optional = true } serde_json = { version = "1", optional = true } base64-compat = { version = "1", optional = true } # Used by cli only diff --git a/README.md b/README.md index 49504984..a440d502 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ The development of the libraries is supported by LNP/BP Standards Association. ### Clone and compile library -Minimum supported rust compiler version (MSRV): 1.47.0 (if command-line tool is not used) and 1.54.0 (otherwise). +Minimum supported rust compiler version (MSRV): 1.51.0 (if command-line tool is not used) and 1.54.0 (otherwise). ```shell script git clone https://github.com/lnp-bp/rust-lnpbp diff --git a/bech32/Cargo.toml b/bech32/Cargo.toml index be83bd98..f0906384 100644 --- a/bech32/Cargo.toml +++ b/bech32/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lnpbp_bech32" -version = "0.5.0-beta.2" +version = "0.5.0" license = "MIT" authors = ["Dr. Maxim Orlovsky "] description = "LNPBP-14 implementation" @@ -13,7 +13,7 @@ edition = "2018" [dependencies] amplify = "3.8.1" bitcoin_hashes = "0.10.0" -strict_encoding = "1.6.0" +strict_encoding = "1.7.4" bech32 = "0.8.1" deflate = { version = "0.8.6", optional = true } inflate = { version = "0.4.5", optional = true } diff --git a/chain/Cargo.toml b/chain/Cargo.toml index ae04c543..a2c66e1c 100644 --- a/chain/Cargo.toml +++ b/chain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lnpbp_chain" -version = "0.5.0-beta.3" +version = "0.5.0" license = "MIT" authors = ["Dr. Maxim Orlovsky "] description = "LNPBP library defining chain parameters" @@ -11,10 +11,10 @@ categories = ["cryptography::cryptocurrencies"] edition = "2018" [dependencies] -amplify = "3.8.1" -bitcoin = "0.27.0" +amplify = "3.9.1" +bitcoin = "0.27.1" bitcoin_hashes = "0.10.0" -strict_encoding = "1.6.1" +strict_encoding = "1.7.4" serde_crate = { package = "serde", version = "1", features = ["derive"], optional = true } serde_with = { version = "1.8", features = ["hex"], optional = true } lazy_static = "1.4.0" # Remove dependency diff --git a/chain/src/lib.rs b/chain/src/lib.rs index 20b22dd9..6d43bb2d 100644 --- a/chain/src/lib.rs +++ b/chain/src/lib.rs @@ -1002,6 +1002,7 @@ impl FromStr for Chain { #[cfg(test)] mod test { + #![allow(deprecated)] // TODO: Refactor with strict_encoding_test crate use strict_encoding::test_helpers::*; use super::*; diff --git a/elgamal/Cargo.toml b/elgamal/Cargo.toml index 4cb9205e..b935573e 100644 --- a/elgamal/Cargo.toml +++ b/elgamal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lnpbp_elgamal" -version = "0.5.0-beta.1" +version = "0.5.0" license = "MIT" authors = ["Dr. Maxim Orlovsky "] description = "LNPBP-31: " @@ -11,7 +11,7 @@ categories = ["cryptography"] edition = "2018" [dependencies] -amplify = "3.8.1" +amplify = "3.9.1" secp256k1 = "0.20.3" bitcoin_hashes = "0.10.0" diff --git a/src/bin/lnpbp.rs b/src/bin/lnpbp.rs index 896b5657..a2bddc73 100644 --- a/src/bin/lnpbp.rs +++ b/src/bin/lnpbp.rs @@ -11,6 +11,8 @@ // along with this software. // If not, see . +#[macro_use] +extern crate clap; #[macro_use] extern crate amplify; extern crate serde_crate as serde; @@ -21,18 +23,17 @@ use std::str::FromStr; use amplify::hex::{FromHex, ToHex}; use base58::{FromBase58, ToBase58}; -use clap::{AppSettings, Clap}; +use clap::Parser; use lnpbp::bech32::Blob; use serde::Serialize; -#[derive(Clap, Clone, Debug)] +#[derive(Parser, Clone, Debug)] #[clap( name = "lnpbp", bin_name = "lnpbp", author, version, - about = "Command-line tool for working with LNP/BP stack", - setting = AppSettings::ColoredHelp, + about = "Command-line tool for working with LNP/BP stack" )] pub struct Opts { /// Command to execute @@ -40,8 +41,7 @@ pub struct Opts { pub command: Command, } -#[derive(Clap, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] -#[clap(setting = AppSettings::ColoredHelp)] +#[derive(Subcommand, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] pub enum Command { /// Commands for working with consignments Convert { @@ -59,7 +59,7 @@ pub enum Command { } #[derive( - Clap, Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, Display + ArgEnum, Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, Display )] pub enum Format { /// Format according to the rust debug rules