[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:prost", "dep:tonic-build"]

[dependencies]
async-trait.workspace = true
bitcoin.workspace = true
cdk-common = { workspace = true, default-features = false, features = [
    "mint",
    "auth",
] }
tonic = { workspace = true, optional = true, features = ["router"] }
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", "auth"], 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-build = { workspace = true, features = ["prost"], optional = true }
