[package]
name = "cdk-signatory"
version.workspace = true
edition.workspace = true
authors = ["CDK Developers"]
description = "CDK signatory default implementation"
homepage = "https://github.com/cashubtc/cdk"
repository = "https://github.com/cashubtc/cdk.git"
rust-version.workspace = true # MSRV
license.workspace = true

[features]
default = ["grpc", "sqlite"]
sqlite = ["cdk-sqlite"]
sqlcipher = ["cdk-sqlite/sqlcipher"]
grpc = ["dep:tonic", "tokio/full", "dep:tonic-prost", "dep:tonic-prost-build", "dep:prost"]

[dependencies]
async-trait.workspace = true
bitcoin.workspace = true
cdk-common = { workspace = true, default-features = false, features = [
    "mint",
    "grpc",
] }
tonic = { workspace = true, optional = true, features = ["transport", "tls-ring", "codegen", "router"] }
tonic-prost = { workspace = true, optional = true }
prost = { workspace = true, optional = true }
tracing.workspace = true
rustls = { workspace = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# main.rs dependencies
anyhow.workspace = true
cdk-sqlite = { workspace = true, features = ["mint"], optional = true }
clap = { workspace = true }
bip39.workspace = true
home.workspace = true
thiserror.workspace = true
tracing-subscriber.workspace = true
tokio = { workspace = true, features = ["full"] }
tokio-stream.workspace = true

[target.'cfg(target_arch = "wasm32")'.dependencies]
tokio = { workspace = true, features = ["rt", "macros", "sync", "time"] }
getrandom = { version = "0.2", features = ["js"] }

[build-dependencies]
tonic-prost-build = { workspace = true, optional = true }

[lints]
workspace = true
