diff --git a/Earthfile b/Earthfile index 30f00065c..a224708f3 100644 --- a/Earthfile +++ b/Earthfile @@ -1,7 +1,7 @@ VERSION 0.8 -IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.2.13 AS mdlint-ci -IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.2.13 AS cspell-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.2.15 AS mdlint-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.2.15 AS cspell-ci FROM debian:stable-slim diff --git a/docs/Earthfile b/docs/Earthfile index 09766872c..b20624efb 100644 --- a/docs/Earthfile +++ b/docs/Earthfile @@ -1,6 +1,6 @@ VERSION 0.8 -IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.2.13 AS docs-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/docs:v3.2.15 AS docs-ci IMPORT .. AS repo diff --git a/integration_tests/rust/overhead_benchmark/Cargo.toml b/integration_tests/rust/overhead_benchmark/Cargo.toml index fbdb4d2b4..8d40e4766 100644 --- a/integration_tests/rust/overhead_benchmark/Cargo.toml +++ b/integration_tests/rust/overhead_benchmark/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "overhead_benchmark" -version = "0.1.0" +version = "0.1.1" edition.workspace = true [lints] @@ -9,8 +9,8 @@ workspace = true [dependencies] cardano-chain-follower = { path = "../.." } -anyhow = "1.0.82" -clap = { version = "4.5.4", features = ["derive", "help", "usage", "std"], default-features = false } -pallas-traverse = "0.30.1" -pallas-hardano = "0.30.1" -tokio = { version = "1.37.0", features = ["macros", "sync", "rt-multi-thread", "rt", "net"] } +anyhow = "1.0.89" +clap = { version = "4.5.19", features = ["derive", "help", "usage", "std"], default-features = false } +pallas-traverse = "0.30.2" +pallas-hardano = "0.30.2" +tokio = { version = "1.40.0", features = ["macros", "sync", "rt-multi-thread", "rt", "net"] } diff --git a/rust/Earthfile b/rust/Earthfile index a76ec1ff2..2ba01a634 100644 --- a/rust/Earthfile +++ b/rust/Earthfile @@ -1,6 +1,6 @@ VERSION 0.8 -IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.2.13 AS rust-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.2.15 AS rust-ci COPY_SRC: FUNCTION @@ -15,15 +15,16 @@ COPY_SRC: hermes-ipfs \ . +# builder : Set up our target toolchains, and copy our files. +builder: + DO rust-ci+SETUP + # sync-cfg: Synchronize local config with CI version. # Must be run by the developer manually. sync-cfg: + FROM +builder DO rust-ci+SYNC_STD_CFG -# builder : Set up our target toolchains, and copy our files. -builder: - DO rust-ci+SETUP - builder-src: FROM +builder diff --git a/rust/c509-certificate/Cargo.toml b/rust/c509-certificate/Cargo.toml index 41f874f2a..0174b0c58 100644 --- a/rust/c509-certificate/Cargo.toml +++ b/rust/c509-certificate/Cargo.toml @@ -21,26 +21,26 @@ workspace = true minicbor = { version = "0.25.1", features = ["std"] } hex = "0.4.3" oid = "0.2.1" -oid-registry = "0.7.0" -asn1-rs = "0.6.0" -anyhow = "1.0.86" +oid-registry = "0.7.1" +asn1-rs = "0.6.2" +anyhow = "1.0.89" bimap = "0.6.3" -once_cell = "1.19.0" +once_cell = "1.20.2" strum = "0.26.3" -strum_macros = "0.26.3" -regex = "1.10.5" +strum_macros = "0.26.4" +regex = "1.11.0" ed25519-dalek = { version = "2.1.1", features = ["pem"] } -thiserror = "1.0.56" -serde = { version = "1.0.204", features = ["derive"] } -wasm-bindgen = "0.2.92" +thiserror = "1.0.64" +serde = { version = "1.0.210", features = ["derive"] } +wasm-bindgen = "0.2.93" serde-wasm-bindgen = "0.6.5" [package.metadata.cargo-machete] ignored = ["strum"] [dev-dependencies] -clap = { version = "4.5.9", features = ["derive"] } -serde_json = "1.0.120" +clap = { version = "4.5.19", features = ["derive"] } +serde_json = "1.0.128" rand = "0.8.5" chrono = "0.4.38" diff --git a/rust/c509-certificate/Earthfile b/rust/c509-certificate/Earthfile index 80af451c1..198a93795 100644 --- a/rust/c509-certificate/Earthfile +++ b/rust/c509-certificate/Earthfile @@ -1,6 +1,6 @@ VERSION 0.8 -IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust::v3.2.13 AS rust-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust::v3.2.15 AS rust-ci IMPORT .. AS rust-local IMPORT ../.. AS repo diff --git a/rust/c509-certificate/src/extensions/extension/data.rs b/rust/c509-certificate/src/extensions/extension/data.rs index 09980dd44..9edc3a94d 100644 --- a/rust/c509-certificate/src/extensions/extension/data.rs +++ b/rust/c509-certificate/src/extensions/extension/data.rs @@ -20,10 +20,22 @@ type ExtensionDataTuple = (i16, Oid<'static>, ExtensionValueType, &'static str); /// Create a type alias for `ExtensionValueType` type Evt = ExtensionValueType; +/// Enum of all C509 Extension Types +pub enum C509ExtensionType { + /// Subject Key Identifier + SubjectKeyIdentifier = 1, + /// Key Usage + KeyUsage = 2, + /// Subject Alternative Name + SubjectAlternativeName = 3, +} + /// `Extension` data table +/// TODO, complete the ENUM above, and use it instead of raw integers here. +/// Name might be able to come from the enum comments, which would reduce redundancy. #[rustfmt::skip] const EXTENSION_DATA: [ExtensionDataTuple; 25] = [ - // Int | OID | Type | Name + // Int | OID | Type | Name ( 1, oid!(2.5.29 .14), Evt::Bytes, "Subject Key Identifier"), ( 2, oid!(2.5.29 .15), Evt::Int, "Key Usage"), ( 3, oid!(2.5.29 .17), Evt::AlternativeName, "Subject Alternative Name"), @@ -33,7 +45,7 @@ const EXTENSION_DATA: [ExtensionDataTuple; 25] = [ ( 7, oid!(2.5.29 .35), Evt::Unsupported, "Authority Key Identifier"), ( 8, oid!(2.5.29 .37), Evt::Unsupported, "Extended Key Usage"), ( 9, oid!(1.3.6 .1 .5 .5 .7 .1 .1), Evt::Unsupported, "Authority Information Access"), - (10, oid!(1.3.6 .1 .4 .1 .11129 .2 .4 .2), Evt::Unsupported, "Signed Certificate Timestamp List"), + (10, oid!(1.3.6 .1 .4 .1 .11129 .2 .4 .2), Evt::Unsupported, "Signed Certificate Timestamp List"), (24, oid!(2.5.29 .9), Evt::Unsupported, "Subject Directory Attributes"), (25, oid!(2.5.29 .18), Evt::AlternativeName, "Issuer Alternative Name"), (26, oid!(2.5.29 .30), Evt::Unsupported, "Name Constraints"), @@ -51,6 +63,17 @@ const EXTENSION_DATA: [ExtensionDataTuple; 25] = [ (38, oid!(1.3.6 .1 .5 .5 .7 .48 .1 .5), Evt::Unsupported, "OCSP No Check"), ]; +impl C509ExtensionType { + /// Get the OID for an Extension Type + #[must_use] + #[allow(clippy::missing_panics_doc)] // Can't really panic unless there is a bug. + pub fn oid(self) -> Oid<'static> { + let ext: i16 = self as i16; + #[allow(clippy::expect_used)] // Can't really panic. + get_oid_from_int(ext).expect("Invalid Extension Type") + } +} + /// A struct of data that contains lookup tables for `Extension`. pub(crate) struct ExtensionData { /// A table of integer to OID, provide a bidirectional lookup. diff --git a/rust/c509-certificate/src/extensions/extension/mod.rs b/rust/c509-certificate/src/extensions/extension/mod.rs index 8fc4ea21c..1d7c2b7c7 100644 --- a/rust/c509-certificate/src/extensions/extension/mod.rs +++ b/rust/c509-certificate/src/extensions/extension/mod.rs @@ -1,6 +1,6 @@ //! C509 Extension use to construct an Extensions message field for C509 Certificate. -mod data; +pub mod data; use std::{fmt::Debug, str::FromStr}; use asn1_rs::Oid; @@ -55,7 +55,7 @@ impl Extension { /// Get the registered OID of the `Extension`. #[must_use] - pub(crate) fn registered_oid(&self) -> &C509oidRegistered { + pub fn registered_oid(&self) -> &C509oidRegistered { &self.registered_oid } } diff --git a/rust/c509-certificate/src/lib.rs b/rust/c509-certificate/src/lib.rs index b60c0cade..5003ab74d 100644 --- a/rust/c509-certificate/src/lib.rs +++ b/rust/c509-certificate/src/lib.rs @@ -46,6 +46,9 @@ use c509::C509; use cert_tbs::TbsCert; use minicbor::{Decode, Encode}; use signing::{PrivateKey, PublicKey}; + +pub use crate::extensions::extension::data::C509ExtensionType; + pub mod algorithm_identifier; pub mod attributes; pub mod big_uint; diff --git a/rust/cardano-chain-follower/Cargo.toml b/rust/cardano-chain-follower/Cargo.toml index 508524fd4..2de3972ac 100644 --- a/rust/cardano-chain-follower/Cargo.toml +++ b/rust/cardano-chain-follower/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cardano-chain-follower" -version = "0.0.2" +version = "0.0.3" edition.workspace = true authors.workspace = true homepage.workspace = true @@ -16,14 +16,14 @@ pallas-hardano = { version = "0.30.1", git = "https://github.com/input-output-hk pallas-crypto = { version = "0.30.1", git = "https://github.com/input-output-hk/catalyst-pallas.git", rev = "9b5183c8b90b90fe2cc319d986e933e9518957b3" } # cspell: words licence -mithril-client = { version = "0.8.16", git = "https://github.com/input-output-hk/catalyst-mithril.git", branch = "fix/lgpl-licence", default-features = false, features = [ +mithril-client = { version = "0.8.18", default-features = false, features = [ "full", "num-integer-backend", ] } -c509-certificate = { version = "0.0.1", git = "https://github.com/input-output-hk/catalyst-libs.git", tag = "v0.0.1" } +c509-certificate = { version = "0.0.3", git = "https://github.com/input-output-hk/catalyst-libs.git" , tag = "v0.0.3" } -thiserror = "1.0.56" +thiserror = "1.0.64" tokio = { version = "1.40.0", features = [ "macros", "rt", @@ -32,13 +32,13 @@ tokio = { version = "1.40.0", features = [ ] } tracing = "0.1.40" tracing-log = "0.2.0" -dashmap = "6.0.1" -url = "2.5.0" -anyhow = "1.0.86" +dashmap = "6.1.0" +url = "2.5.2" +anyhow = "1.0.89" chrono = "0.4.38" -async-trait = "0.1.82" +async-trait = "0.1.83" dirs = "5.0.1" -futures = "0.3.30" +futures = "0.3.31" humantime = "2.1.0" crossbeam-skiplist = "0.1.3" crossbeam-channel = "0.5.13" @@ -47,26 +47,26 @@ strum = "0.26.3" ouroboros = "0.18.4" hex = "0.4.3" rayon = "1.10.0" -serde = "1.0.209" +serde = "1.0.210" serde_json = "1.0.128" mimalloc = { version = "0.1.43", optional = true } memx = "0.1.32" fmmap = { version = "0.3.3", features = ["sync", "tokio-async"] } -minicbor = { version = "0.24.4", features = ["alloc", "derive", "half"] } -brotli = "6.0.0" +minicbor = { version = "0.25.1", features = ["alloc", "derive", "half"] } +brotli = "7.0.0" zstd = "0.13.2" x509-cert = "0.2.5" ed25519-dalek = "2.1.1" blake2b_simd = "1.0.2" num-traits = "0.2.19" logcall = "0.1.9" -tar = "0.4.41" +tar = "0.4.42" ureq = { version = "2.10.1", features = ["native-certs"] } http = "1.1.0" hickory-resolver = { version = "0.24.1", features = ["dns-over-rustls"] } moka = { version = "0.12.8", features = ["sync"] } der-parser = "9.0.0" -regex = "1.10.6" +regex = "1.11.0" bech32 = "0.11.0" [dev-dependencies] @@ -75,7 +75,7 @@ tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } test-log = { version = "0.2.16", default-features = false, features = [ "trace", ] } -clap = "4.5.17" +clap = "4.5.19" # Note, these features are for support of features exposed by dependencies. [features] diff --git a/rust/cardano-chain-follower/src/metadata/cip509/mod.rs b/rust/cardano-chain-follower/src/metadata/cip509/mod.rs index 493aebdb3..f699cde13 100644 --- a/rust/cardano-chain-follower/src/metadata/cip509/mod.rs +++ b/rust/cardano-chain-follower/src/metadata/cip509/mod.rs @@ -5,16 +5,16 @@ // cspell: words pkix pub mod rbac; +pub mod utils; pub mod x509_chunks; mod decode_helper; -mod utils; use std::sync::Arc; -use c509_certificate::general_names::general_name::GeneralNameValue; +use c509_certificate::{general_names::general_name::GeneralNameValue, C509ExtensionType}; use decode_helper::{decode_bytes, decode_helper, decode_map_len}; -use der_parser::{asn1_rs::oid, der::parse_der_sequence, Oid}; +use der_parser::der::parse_der_sequence; use minicbor::{ decode::{self}, Decode, Decoder, @@ -51,9 +51,6 @@ pub const LABEL: u64 = 509; /// uniform resource identifier (URI) in the subject alternative name extension. pub(crate) const URI: u8 = 134; -/// Subject Alternative Name OID -pub(crate) const SUBJECT_ALT_NAME_OID: Oid = oid!(2.5.29 .17); - /// CIP509 metadatum. #[derive(Debug, PartialEq, Clone, Default)] pub struct Cip509 { @@ -642,17 +639,17 @@ impl Cip509 { ); }, C509Cert::C509Certificate(c509) => { - for exts in c509.get_tbs_cert().get_extensions().get_inner() { - if exts.get_registered_oid().get_c509_oid().get_oid() - == SUBJECT_ALT_NAME_OID + for exts in c509.tbs_cert().extensions().extensions() { + if *exts.registered_oid().c509_oid().oid() + == C509ExtensionType::SubjectAlternativeName.oid() { - match exts.get_value() { + match exts.value() { c509_certificate::extensions::extension::ExtensionValue::AlternativeName(alt_name) => { - match alt_name.get_inner() { + match alt_name.general_name() { c509_certificate::extensions::alt_name::GeneralNamesOrText::GeneralNames(gn) => { - for name in gn.get_inner() { - if name.get_gn_type() == &c509_certificate::general_names::general_name::GeneralNameTypeRegistry::UniformResourceIdentifier { - match name.get_gn_value() { + for name in gn.general_names() { + if name.gn_type() == &c509_certificate::general_names::general_name::GeneralNameTypeRegistry::UniformResourceIdentifier { + match name.gn_value() { GeneralNameValue::Text(s) => { if let Some(h) = extract_cip19_hash(s, Some("stake")) { pk_addrs.push(h); diff --git a/rust/cardano-chain-follower/src/metadata/cip509/rbac/role_data.rs b/rust/cardano-chain-follower/src/metadata/cip509/rbac/role_data.rs index b56f16f0f..21733a953 100644 --- a/rust/cardano-chain-follower/src/metadata/cip509/rbac/role_data.rs +++ b/rust/cardano-chain-follower/src/metadata/cip509/rbac/role_data.rs @@ -112,15 +112,15 @@ impl Decode<'_, ()> for KeyReference { #[derive(Debug, PartialEq, Clone)] pub struct KeyLocalRef { /// Local reference. - local_ref: LocalRefInt, + pub local_ref: LocalRefInt, /// Key offset. - key_offset: u64, + pub key_offset: u64, } /// Enum of local reference with its associated unsigned integer value. #[derive(FromRepr, Debug, PartialEq, Clone)] #[repr(u8)] -enum LocalRefInt { +pub enum LocalRefInt { /// x509 certificates. X509Certs = Cip509RbacMetadataInt::X509Certs as u8, // 10 /// c509 certificates. diff --git a/rust/cardano-chain-follower/src/metadata/cip509/utils.rs b/rust/cardano-chain-follower/src/metadata/cip509/utils.rs index 0f4d55adf..47cb0c434 100644 --- a/rust/cardano-chain-follower/src/metadata/cip509/utils.rs +++ b/rust/cardano-chain-follower/src/metadata/cip509/utils.rs @@ -7,7 +7,8 @@ use crate::witness::TxWitness; /// Example input: `web+cardano://addr/` /// /// URI = scheme ":" ["//" authority] path ["?" query] ["#" fragment] -pub(crate) fn extract_cip19_hash(uri: &str, prefix: Option<&str>) -> Option> { +#[must_use] +pub fn extract_cip19_hash(uri: &str, prefix: Option<&str>) -> Option> { // Regex pattern to match the expected URI format let r = Regex::new("^.+://addr/(.+)$").ok()?; diff --git a/rust/catalyst-voting/Cargo.toml b/rust/catalyst-voting/Cargo.toml index e26728cea..866437d4e 100644 --- a/rust/catalyst-voting/Cargo.toml +++ b/rust/catalyst-voting/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "catalyst-voting" -version = "0.1.0" +version = "0.0.1" edition.workspace = true authors.workspace = true homepage.workspace = true @@ -11,9 +11,9 @@ license.workspace = true workspace = true [dependencies] -thiserror = "1.0.56" +thiserror = "1.0.64" rand_core = "0.6.4" -curve25519-dalek = { version = "4.0", features = ["digest"] } +curve25519-dalek = { version = "4.1.3", features = ["digest"] } blake2b_simd = "1.0.2" [dev-dependencies] diff --git a/rust/cbork-abnf-parser/Cargo.toml b/rust/cbork-abnf-parser/Cargo.toml index 6d438b813..debe86fa6 100644 --- a/rust/cbork-abnf-parser/Cargo.toml +++ b/rust/cbork-abnf-parser/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "cbork-abnf-parser" -version = "0.0.1" +version = "0.0.3" edition.workspace = true license.workspace = true authors.workspace = true @@ -16,6 +16,6 @@ workspace = true [dependencies] derive_more = {version = "1.0.0", features = ["from"] } -pest = { version = "2.7.2", features = ["std", "pretty-print", "memchr", "const_prec_climber"] } -pest_derive = { version = "2.7.2", features = ["grammar-extras"] } -thiserror = "1.0.56" +pest = { version = "2.7.13", features = ["std", "pretty-print", "memchr", "const_prec_climber"] } +pest_derive = { version = "2.7.13", features = ["grammar-extras"] } +thiserror = "1.0.64" diff --git a/rust/cbork-cddl-parser/Cargo.toml b/rust/cbork-cddl-parser/Cargo.toml index fad6435f3..b2c7e307a 100644 --- a/rust/cbork-cddl-parser/Cargo.toml +++ b/rust/cbork-cddl-parser/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "cbork-cddl-parser" -version = "0.0.1" +version = "0.0.3" edition.workspace = true license.workspace = true authors.workspace = true @@ -16,6 +16,6 @@ workspace = true [dependencies] derive_more = {version = "1.0.0", features = ["from","display"] } -pest = { version = "2.7.2", features = ["std", "pretty-print", "memchr", "const_prec_climber"] } -pest_derive = { version = "2.7.2", features = ["grammar-extras"] } -thiserror = "1.0.56" +pest = { version = "2.7.13", features = ["std", "pretty-print", "memchr", "const_prec_climber"] } +pest_derive = { version = "2.7.13", features = ["grammar-extras"] } +thiserror = "1.0.64" diff --git a/rust/cbork/Cargo.toml b/rust/cbork/Cargo.toml index 9827d5a6c..e5af55aec 100644 --- a/rust/cbork/Cargo.toml +++ b/rust/cbork/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cbork" -version = "0.0.1" +version = "0.0.3" edition.workspace = true license.workspace = true authors.workspace = true @@ -15,10 +15,10 @@ workspace = true [dependencies] # Always used a versioned dependency, so that changes to dependent libraries do not cause cascading # breakage inside the repo. -cbork-cddl-parser = {version = "0.0.1", git = "https://github.com/input-output-hk/catalyst-libs.git", tag = "v0.0.1" } +cbork-cddl-parser = {version = "0.0.3", git = "https://github.com/input-output-hk/catalyst-libs.git", tag = "v0.0.3" } # Only use this for testing - do not change dependency to this in checked in code. #cbork-cddl-parser = { path = "../cbork-cddl-parser", version = "0.1.0" } -clap = { version = "4.5.3", features = ["derive", "env"] } -anyhow = "1.0.71" +clap = { version = "4.5.19", features = ["derive", "env"] } +anyhow = "1.0.89" console = "0.15.8" diff --git a/rust/cbork/Earthfile b/rust/cbork/Earthfile index bc0dd2c19..ed2e6473f 100644 --- a/rust/cbork/Earthfile +++ b/rust/cbork/Earthfile @@ -1,6 +1,6 @@ VERSION 0.8 -IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust::v3.2.13 AS rust-ci +IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust::v3.2.15 AS rust-ci IMPORT .. AS rust-local diff --git a/rust/hermes-ipfs/Cargo.toml b/rust/hermes-ipfs/Cargo.toml index 141da4adb..9fba93ecb 100644 --- a/rust/hermes-ipfs/Cargo.toml +++ b/rust/hermes-ipfs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hermes-ipfs" -version = "0.0.1" +version = "0.0.3" edition.workspace = true license.workspace = true authors.workspace = true @@ -11,17 +11,17 @@ repository.workspace = true workspace = true [dependencies] -anyhow = "1.0.71" +anyhow = "1.0.89" derive_more = {version = "1.0.0", features = ["from","into","display"] } -libipld = "0.16.0" -rust-ipfs = "0.11.21" -tokio = "1.36.0" +ipld-core = { version = "0.4.1", features = ["serde"]} +rust-ipfs = "0.12.1" +tokio = "1.40.0" [dev-dependencies] # Dependencies used by examples -clap = { version = "4.5.3", features = ["derive"] } +clap = { version = "4.5.19", features = ["derive"] } dirs = "5.0.1" lipsum = "0.9.1" rand = "0.8.5" -rustyline-async = "0.4.2" +rustyline-async = "0.4.3" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } diff --git a/rust/hermes-ipfs/src/lib.rs b/rust/hermes-ipfs/src/lib.rs index 6b2b41e78..09ccda894 100644 --- a/rust/hermes-ipfs/src/lib.rs +++ b/rust/hermes-ipfs/src/lib.rs @@ -6,9 +6,9 @@ use std::str::FromStr; use derive_more::{Display, From, Into}; /// IPFS Content Identifier. -pub use libipld::Cid; +pub use ipld_core::cid::Cid; /// IPLD -pub use libipld::Ipld; +pub use ipld_core::ipld::Ipld; /// `rust_ipfs` re-export. pub use rust_ipfs; /// libp2p re-exports. @@ -30,7 +30,7 @@ pub use rust_ipfs::StorageType; /// Stream for `PubSub` Topic Subscriptions. pub use rust_ipfs::SubscriptionStream; /// Builder type for IPFS Node configuration. -use rust_ipfs::UninitializedIpfsNoop; +use rust_ipfs::UninitializedIpfsDefault as UninitializedIpfs; use rust_ipfs::{ dag::ResolveError, libp2p::gossipsub::{Message as PubsubMessage, MessageId as PubsubMessageId}, @@ -43,13 +43,13 @@ use rust_ipfs::{ pub struct MessageId(pub PubsubMessageId); /// Builder type for IPFS Node configuration. -pub struct IpfsBuilder(UninitializedIpfsNoop); +pub struct IpfsBuilder(UninitializedIpfs); impl IpfsBuilder { #[must_use] /// Create a new` IpfsBuilder`. pub fn new() -> Self { - Self(UninitializedIpfsNoop::new()) + Self(UninitializedIpfs::new()) } #[must_use] @@ -271,7 +271,7 @@ impl HermesIpfs { /// /// Returns error if unable to add peer. pub async fn add_peer(&self, peer_id: PeerId, addr: Multiaddr) -> anyhow::Result<()> { - self.node.add_peer(peer_id, addr).await + self.node.add_peer((peer_id, addr)).await } /// List of local listening addresses