[package]
authors.workspace      = true
categories             = ["no-std"]
description            = "Client library that facilitates interaction with the Miden network"
documentation          = "https://docs.rs/miden-client"
edition.workspace      = true
keywords               = ["client", "miden"]
license.workspace      = true
name                   = "miden-client"
readme                 = "README.md"
repository.workspace   = true
rust-version.workspace = true
version.workspace      = true

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

[package.metadata.cargo-machete]
# "prost-types" and "tonic-prost" are ignored because they are needed by the generated proto bindings.
ignored = ["getrandom", "prost-types", "tonic-prost"]

[lib]
crate-type = ["lib"]

[features]
default = ["std"]
std = [
  "miden-protocol/std",
  "miden-remote-prover-client/std",
  "miden-remote-prover-client/tx-prover",
  "miden-tx/concurrent",
  "tonic/tls-native-roots",
  "tonic/tls-ring",
  "tonic/transport",
]
testing = ["dep:miden-testing", "dep:uuid", "miden-protocol/testing", "miden-standards/testing", "miden-tx/testing"]
tonic = []

[dependencies]
# Miden dependencies
miden-mast-package         = { default-features = false, version = "0.20" }
miden-protocol             = { workspace = true }
miden-remote-prover-client = { default-features = false, features = ["tx-prover"], workspace = true }
miden-standards            = { workspace = true }
miden-testing              = { optional = true, workspace = true }
miden-tx                   = { workspace = true }

# External dependencies
anyhow       = { workspace = true }
async-trait  = { workspace = true }
chrono       = { optional = false, version = "0.4" }
futures      = { version = "0.3" }
hex          = { workspace = true }
prost        = { default-features = false, features = ["derive"], version = "0.14" }
prost-types  = { version = "0.14" }
rand         = { workspace = true }
serde        = { workspace = true }
serde_json   = { version = "1.0" }
thiserror    = { workspace = true }
tonic        = { default-features = false, features = ["codegen"], version = "0.14" }
tonic-health = { version = "0.14" }
tonic-prost  = { version = "0.14" }
tracing      = { workspace = true }
uuid         = { features = ["js", "serde", "v4"], optional = true, version = "1.10" }

[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom             = { features = ["wasm_js"], version = "0.3" }
tonic-web-wasm-client = { default-features = false, version = "0.9" }
web-sys               = { features = ["Storage", "Window", "console"], version = "0.3" }

[build-dependencies]
miden-node-proto-build           = { workspace = true }
miden-note-transport-proto-build = { workspace = true }
miden-protocol                   = { workspace = true }
miden-standards                  = { workspace = true }
miette                           = { workspace = true }
prost                            = { default-features = false, features = ["derive"], version = "0.14" }
tonic-prost-build                = { version = "0.14" }

[dev-dependencies]
miden-protocol  = { default-features = false, features = ["testing"], workspace = true }
miden-standards = { features = ["testing"], workspace = true }
miden-testing   = { default-features = false, workspace = true }
tokio           = { workspace = true }
web-sys         = { features = ["console"], version = "0.3" }

[lints]
workspace = true
