[package]
authors = { workspace = true }
description = "fedimint-core provides common code used by both client and server."
edition = { workspace = true }
license = { workspace = true }
name = "fedimint-core"
readme = { workspace = true }
repository = { workspace = true }
version = { workspace = true }

[package.metadata.cargo-udeps.ignore]
development = ["tokio-test"]

[features]

[lib]
name = "fedimint_core"
path = "src/lib.rs"

[dependencies]
anyhow = { workspace = true }
async-channel = { workspace = true }
async-recursion = { workspace = true }
async-trait = { workspace = true }
backon = { workspace = true }
backtrace = { workspace = true }
base64 = { workspace = true }
bech32 = { workspace = true }
bitcoin = { workspace = true }
bitcoin-io = { workspace = true }
bitcoin-units = { workspace = true }
bitvec = { workspace = true }
bls12_381 = { workspace = true }
erased-serde = { workspace = true }
fedimint-derive = { workspace = true }
fedimint-logging = { workspace = true }
fedimint-util-error = { workspace = true }
futures = { workspace = true }
group = { workspace = true }
hex = { workspace = true, features = ["serde"] }
hex-conservative = { workspace = true }
imbl = { workspace = true }
iroh = { workspace = true, default-features = false }
iroh-base = { workspace = true, features = ["key"] }
iroh-relay = { workspace = true, default-features = false }
itertools = { workspace = true }
jsonrpsee-core = { workspace = true, features = ["client"] }
lightning = { workspace = true }
lightning-invoice = { workspace = true, features = ["serde"] }
lightning-types = { workspace = true }
macro_rules_attribute = { workspace = true }
miniscript = { workspace = true, features = ["serde"] }
n0-future = { workspace = true }
rand = { workspace = true }
scopeguard = { workspace = true }
secp256k1 = { workspace = true, features = ["global-context", "rand-std"] }
serde = { workspace = true }
serde_json = { workspace = true }
serdect = { workspace = true }
slotmap = { workspace = true }
strum = { workspace = true }
strum_macros = { workspace = true }
thiserror = { workspace = true }
threshold_crypto = { workspace = true }
tracing = { workspace = true }
url = { workspace = true, features = ["serde"] }
z32 = { workspace = true }

[target.'cfg(not(target_family = "wasm"))'.dependencies]
aws-lc-sys = { version = "0.30", features = ["bindgen"] }
iroh = { workspace = true, default-features = false, features = [
    "discovery-pkarr-dht",
] }
tokio = { workspace = true, features = ["full", "tracing"] }
tokio-rustls = { workspace = true }

[target.'cfg(target_family = "wasm")'.dependencies]
async-lock = { workspace = true }
futures-util = { workspace = true }
# getrandom is transitive dependency of rand
# on wasm, we need to enable the js backend
# see https://docs.rs/getrandom/latest/getrandom/#indirect-dependencies and https://docs.rs/getrandom/latest/getrandom/#webassembly-support
getrandom = { workspace = true, features = ["wasm_js"] }
gloo-timers = { workspace = true, features = ["futures"] }
js-sys = { workspace = true }
# enable lowmemory for better bundle size
secp256k1 = { workspace = true, features = ["lowmemory"] }
tokio = { workspace = true, features = ["io-util"] }
wasm-bindgen-futures = { workspace = true }

[dev-dependencies]
assert_matches = { workspace = true }
test-log = { workspace = true }
tokio-test = { workspace = true }

[lints]
workspace = true
