diff --git a/Cargo.lock b/Cargo.lock index 85da877..24ecd3e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1346,7 +1346,7 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "waku-bindings" -version = "0.1.0-beta2" +version = "0.1.0-beta3" dependencies = [ "aes-gcm", "base64", @@ -1366,7 +1366,7 @@ dependencies = [ [[package]] name = "waku-sys" -version = "0.1.0-beta2" +version = "0.1.0-beta3" dependencies = [ "bindgen", ] diff --git a/waku-bindings/Cargo.toml b/waku-bindings/Cargo.toml index 7d0c3fa..fa4ceeb 100644 --- a/waku-bindings/Cargo.toml +++ b/waku-bindings/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "waku-bindings" -version = "0.1.0-beta2" +version = "0.1.0-beta3" edition = "2021" authors = [ "Daniel Sanchez Quiros " @@ -25,7 +25,7 @@ serde_json = "1.0" sscanf = "0.3" smart-default = "0.6" url = "2.3" -waku-sys = { version = "0.1.0-beta2", path = "../waku-sys" } +waku-sys = { version = "0.1.0-beta3", path = "../waku-sys" } [dev-dependencies] serial_test = "0.10.0" diff --git a/waku-bindings/src/node/config.rs b/waku-bindings/src/node/config.rs index 6a5edb5..ecbf5a6 100644 --- a/waku-bindings/src/node/config.rs +++ b/waku-bindings/src/node/config.rs @@ -4,6 +4,7 @@ use std::fmt::{Display, Formatter}; use std::str::FromStr; // std // crates +use crate::WakuPubSubTopic; use multiaddr::Multiaddr; use secp256k1::SecretKey; use serde::{Deserialize, Serialize}; @@ -33,6 +34,8 @@ pub struct WakuNodeConfig { /// Enable relay protocol. Default `true` #[default(Some(true))] pub relay: Option, + #[serde(default)] + pub relay_topics: Vec, /// The minimum number of peers required on a topic to allow broadcasting a message. Default `0` #[default(Some(0))] pub min_peers_to_publish: Option, @@ -47,7 +50,7 @@ pub struct WakuNodeConfig { #[serde(rename = "discV5")] pub discv5: Option, /// Array of bootstrap nodes ENR. - #[serde(rename = "discV5BootstrapNodes")] + #[serde(rename = "discV5BootstrapNodes", default)] pub discv5_bootstrap_nodes: Vec, /// UDP port for DiscoveryV5. Default `9000`. #[default(Some(9000))] diff --git a/waku-bindings/tests/node.rs b/waku-bindings/tests/node.rs index 5850ae4..58856ea 100644 --- a/waku-bindings/tests/node.rs +++ b/waku-bindings/tests/node.rs @@ -26,6 +26,7 @@ pub fn main() -> Result<(), String> { node_key: None, keep_alive_interval: None, relay: None, + relay_topics: vec![], min_peers_to_publish: None, filter: None, log_level: Some(WakuLogLevel::Error), diff --git a/waku-sys/Cargo.toml b/waku-sys/Cargo.toml index 888b796..45838a4 100644 --- a/waku-sys/Cargo.toml +++ b/waku-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "waku-sys" -version = "0.1.0-beta2" +version = "0.1.0-beta3" edition = "2021" authors = [ "Daniel Sanchez Quiros " diff --git a/waku-sys/vendor b/waku-sys/vendor index 2c9c763..6c989fb 160000 --- a/waku-sys/vendor +++ b/waku-sys/vendor @@ -1 +1 @@ -Subproject commit 2c9c763c306dfa10dc371134d830702d4e0fbf0f +Subproject commit 6c989fb1780159aacd8ec210ac4d7a33f40005df