[package]
name = "lumina-node"
version = "0.17.0"
edition.workspace = true
license = "Apache-2.0"
description = "Celestia data availability node implementation in Rust"
authors = ["Eiger <hello@eiger.co>"]
homepage = "https://www.eiger.co"
repository = "https://github.com/eigerco/lumina"
readme = "README.md"
rust-version = "1.88"
# crates.io is limited to 5 keywords and 5 categories
keywords = ["blockchain", "celestia", "lumina", "node"]
# Must be one of <https://crates.io/category_slugs>
categories = [
  "asynchronous",
  "cryptography::cryptocurrencies",
  "network-programming",
  "wasm",
]

[lib]
crate-type = ["lib", "staticlib", "cdylib"]

[dependencies]
beetswap.workspace = true
celestia-proto.workspace = true
celestia-types.workspace = true
lumina-utils = { workspace = true, features = ["executor", "token", "time"] }

libp2p = { workspace = true, features = [
  "autonat",
  "ping",
  "gossipsub",
  "identify",
  "macros",
  "request-response",
  "kad",
] }
prost.workspace = true
tendermint-proto.workspace = true
tendermint.workspace = true

async-trait.workspace = true
cid = { workspace = true, features = ["serde-codec"] }
dashmap = "6"
futures.workspace = true
multihash-codetable = { version = "0.1.2", features = ["sha2"] }
rand.workspace = true
serde = { workspace = true, features = ["derive"] }
smallvec = { version = "1.13.2", features = [
  "union",
  "const_generics",
  "serde",
] }
thiserror.workspace = true
tokio = { workspace = true, features = ["macros", "sync"] }
tokio-util.workspace = true
tracing.workspace = true
void = "1"
uniffi = { workspace = true, optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
backoff = { version = "0.4.0", features = ["tokio"] }
blockstore = { workspace = true, features = ["redb"] }
tokio = { workspace = true, features = ["fs", "rt-multi-thread", "time"] }
libp2p = { workspace = true, features = [
  "noise",
  "dns",
  "tcp",
  "tokio",
  "yamux",
  "websocket",
  "quic",
] }
redb.workspace = true
rustls-pemfile = "2"
rustls-pki-types = "1.11"

[target.'cfg(target_arch = "wasm32")'.dependencies]
backoff = { version = "0.4", features = ["wasm-bindgen"] }
beetswap = { workspace = true, features = ["wasm-bindgen"] }
blockstore = { workspace = true, features = ["indexeddb"] }
celestia-types = { workspace = true, features = ["wasm-bindgen"] }
getrandom_03.workspace = true
gloo-timers.workspace = true
idb = "0.6.2"
js-sys.workspace = true
libp2p = { workspace = true, features = [
  "noise",
  "wasm-bindgen",
  "websocket-websys",
  "webtransport-websys",
  "yamux",
] }
libp2p-websocket-websys.workspace = true
pin-project.workspace = true
rexie.workspace = true
send_wrapper.workspace = true
serde_json.workspace = true
serde-wasm-bindgen.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-sys = { workspace = true, features = [
  "Request",
  "RequestInit",
  "RequestMode",
  "Response",
  "Headers",
] }

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test.workspace = true

[dev-dependencies]
celestia-rpc = { workspace = true, features = ["p2p"] }
celestia-types = { workspace = true, features = ["test-utils"] }
# required to have path based dependency here to allow `cargo publish` to work
# https://github.com/rust-lang/cargo/pull/7333
lumina-node = { path = ".", features = ["test-utils"] }
lumina-utils = { workspace = true, features = ["test-utils"] }

bytes.workspace = true
rstest = "0.26"
serde_json.workspace = true
tempfile = "3"

[features]
test-utils = ["celestia-types/test-utils"]
uniffi = ["dep:uniffi", "celestia-types/uniffi"]
wasm-bindgen = []

[package.metadata.docs.rs]
features = ["test-utils"]
rustdoc-args = ["--cfg", "docsrs"]
