Skip to content

Commit

Permalink
Add lightning encoding to NodeId
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Jun 15, 2022
1 parent e48950c commit b4c4742
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
5 changes: 3 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "internet2"
version = "0.8.0-beta.1"
version = "0.8.0-rc.1"
license = "Apache-2.0"
authors = ["Dr. Maxim Orlovsky <[email protected]>"]
description = "Rust implementation for the stack of Internet2 protocols"
Expand Down Expand Up @@ -31,7 +31,7 @@ required-features = ["keygen"]
amplify = "3.12.0"
strict_encoding = { version = "1.8.1", default-features = false, features = ["derive"] }
lightning_encoding = "0.7.1"
inet2_addr = { version = "0.8.0-rc.1", features = ["strict_encoding", "stringly_conversions"], path = "./addr" }
inet2_addr = { version = "0.8.0-rc.1", features = ["strict_encoding", "lightning_encoding", "stringly_conversions"], path = "./addr" }
inet2_derive = { version = "0.8.0-alpha.1", default-features = false, optional = true, path = "./derive" }
# Dependencies on core rust-bitcoin & cryptography
# ------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions addr/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "inet2_addr"
version = "0.8.0-rc.1"
version = "0.8.0-rc.2"
license = "Apache-2.0"
authors = ["Dr. Maxim Orlovsky <[email protected]>"]
description = "Internet2 addresses with support for Tor v3"
Expand All @@ -19,6 +19,7 @@ path = "src/lib.rs"
[dependencies]
amplify = "3.12.0"
strict_encoding = { version = "1.8.1", optional = true }
lightning_encoding = { version = "0.7.1", optional = true }
stringly_conversions_crate = { package = "stringly_conversions", version = "0.1.1", optional = true, features = ["alloc"] }
torut = { version = "0.2.1", optional = true }
secp256k1 = "0.22.1"
Expand All @@ -32,7 +33,7 @@ serde_yaml = { version = "0.8", optional = true }
toml = { version = "0.5", optional = true }

[features]
all = ["serde", "tor", "parse_arg", "stringly_conversions", "strict_encoding", "keygen"]
all = ["serde", "tor", "parse_arg", "stringly_conversions", "strict_encoding", "lightning_encoding", "keygen"]
default = ["stringly_conversions"]
serde = ["serde_crate", "torut/serialize",
"serde_yaml", "serde_json", "toml",
Expand Down
3 changes: 3 additions & 0 deletions addr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ extern crate stringly_conversions_crate as stringly_conversions;
#[cfg(feature = "strict_encoding")]
#[macro_use]
extern crate strict_encoding;
#[cfg(feature = "lightning_encoding")]
#[macro_use]
extern crate lightning_encoding;
#[cfg(feature = "serde")]
#[macro_use]
extern crate serde_crate as serde;
Expand Down
4 changes: 4 additions & 0 deletions addr/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ pub enum NodeAddrParseError {
Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, Display, From
)]
#[cfg_attr(feature = "strict_encoding", derive(StrictEncode, StrictDecode))]
#[cfg_attr(
feature = "lightning_encoding",
derive(LightningEncode, LightningDecode)
)]
#[cfg_attr(
feature = "serde",
derive(Serialize, Deserialize),
Expand Down

0 comments on commit b4c4742

Please sign in to comment.