[package]
name = "kitsune_p2p"
version = "0.3.0-beta-dev.17"
description = "p2p / dht communication framework"
license = "Apache-2.0"
homepage = "https://github.com/holochain/holochain"
documentation = "https://docs.rs/kitsune_p2p"
authors = ["Holochain Core Dev Team <devcore@holochain.org>"]
keywords = ["holochain", "holo", "p2p", "dht", "networking"]
categories = ["network-programming"]
edition = "2021"

[dependencies]
arrayref = "0.3.6"
base64 = "0.21.2"
bloomfilter = { version = "1.0.5", features = ["serde"] }
bytes = "1.4.0"
derive_more = "0.99.11"
futures = "0.3"
ghost_actor = "=0.3.0-alpha.6"
governor = "0.3.2"
itertools = "0.11.0"
kitsune_p2p_fetch = { version = "^0.3.0-beta-dev.12", path = "../fetch" }
kitsune_p2p_mdns = { version = "^0.3.0-beta-dev.1", path = "../mdns" }
kitsune_p2p_proxy = { version = "^0.3.0-beta-dev.10", path = "../proxy" }
kitsune_p2p_timestamp = { version = "^0.3.0-beta-dev.3", path = "../timestamp", features = ["now"] }
kitsune_p2p_block = { version = "^0.3.0-beta-dev.8", path = "../block" }
kitsune_p2p_transport_quic = { version = "^0.3.0-beta-dev.10", path = "../transport_quic", optional = true }
kitsune_p2p_types = { version = "^0.3.0-beta-dev.10", path = "../types", default-features = false }
must_future = "0.1.1"
nanoid = "0.4"
num-traits = "0.2"
holochain_trace = { version = "^0.3.0-beta-dev.1", path = "../../holochain_trace" }
once_cell = "1.4.1"
opentelemetry_api = { version = "=0.20.0-beta.1", features = [ "metrics" ], package = "ts_opentelemetry_api" }
parking_lot = "0.12.1"
rand = "0.8.5"
reqwest = "0.11.2"
serde = { version = "1.0", features = ["derive"] }
serde_bytes = "0.11"
serde_json = { version = "1.0.51", features = [ "preserve_order" ] }
thiserror = "1.0.22"
tokio = { version = "1.27", features = ["full"] }
tracing = "0.1"
tokio-stream = "0.1"
tx5 = { version = "=0.0.3-alpha", optional = true }
url2 = "0.0.6"
fixt = { path = "../../fixt", version = "^0.3.0-beta-dev.0"}

# fuzzing
arbitrary = { version = "1.0", features = ["derive"], optional = true }
contrafact = { version = "0.2.0-rc.1", optional = true }
proptest = { version = "1", optional = true }
proptest-derive = { version = "0", optional = true }

blake2b_simd = { version = "0.5.10", optional = true }
maplit = { version = "1", optional = true }
mockall = { version = "0.11.3", optional = true }

[dev-dependencies]
# include self with test_utils feature, to allow integration tests to run properly
kitsune_p2p = { path = ".", features = ["test_utils", "fuzzing", "sqlite"]}

kitsune_p2p_fetch = { path = "../fetch", features = ["test_utils"] }
kitsune_p2p_bootstrap = { path = "../bootstrap", features = ["sqlite"] }
kitsune_p2p_timestamp = { path = "../timestamp", features = ["now", "arbitrary"] }
kitsune_p2p_types = { path = "../types", features = ["test_utils"] }
maplit = "1"
mockall = "0.11.3"
pretty_assertions = "1.4.0"
test-case = "1.0.0"
tokio = { version = "1.11", features = ["full", "test-util"] }
tracing-subscriber = "0.3.16"
tx5-signal-srv = "=0.0.3-alpha"
ed25519-dalek = "1"
rand_dalek = { version = "0.7", package = "rand" } # Compatibility with dalek

[features]
default = [ "tx2", "tx5" ]

fuzzing = [
  "arbitrary",
  "contrafact",
  "proptest",
  "proptest-derive",
  "kitsune_p2p_timestamp/fuzzing",
  "kitsune_p2p_types/fuzzing",
]

test_utils = [
  "blake2b_simd",
  "tokio/test-util",
  "ghost_actor/test_utils",
  "kitsune_p2p_types/test_utils",
  "maplit",
  "mockall",
]

mock_network = [
  "kitsune_p2p_types/test_utils",
  "mockall",
]

tx2 = [ "kitsune_p2p_types/tx2", "kitsune_p2p_transport_quic" ]

sqlite-encrypted = [
  "kitsune_p2p_fetch/sqlite-encrypted",
  "kitsune_p2p_proxy/sqlite-encrypted",
  "kitsune_p2p_timestamp/sqlite-encrypted",
  "kitsune_p2p_block/sqlite-encrypted",
  "kitsune_p2p_transport_quic/sqlite-encrypted",
  "kitsune_p2p_types/sqlite-encrypted",
]
sqlite = [
  "kitsune_p2p_fetch/sqlite",
  "kitsune_p2p_proxy/sqlite",
  "kitsune_p2p_timestamp/sqlite",
  "kitsune_p2p_block/sqlite",
  "kitsune_p2p_transport_quic/sqlite",
  "kitsune_p2p_types/sqlite",
]
