# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.94"
name = "hopr-api"
version = "1.10.0"
authors = ["HOPR Association <tech@hoprnet.org>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Common high-level external and internal API traits used by hopr-lib to implement the HOPR protocol"
homepage = "https://hoprnet.org/"
readme = "README.md"
license = "GPL-3.0-only"
repository = "https://github.com/hoprnet/hopr-api"

[features]
chain = [
    "dep:auto_impl",
    "types-chain",
    "dep:auto_impl",
]
ct = []
default = []
full = [
    "chain",
    "ct",
    "network",
    "graph",
    "node",
    "node-session-client",
    "node-session-server",
    "serde",
    "tickets",
    "types-chain",
    "types-random",
    "types-fixed-rng",
    "types-telemetry",
]
graph = ["dep:auto_impl"]
network = ["dep:auto_impl"]
node = [
    "chain",
    "graph",
    "network",
    "tickets",
    "dep:atomic_enum",
    "dep:auto_impl",
]
node-session-client = ["node"]
node-session-server = ["node"]
serde = [
    "hopr-types/serde",
    "dep:serde",
]
tickets = [
    "chain",
    "dep:auto_impl",
]
types-chain = ["hopr-types/chain"]
types-fixed-rng = ["hopr-types/fixed-rng"]
types-internal = ["hopr-types/internal"]
types-keypair = ["hopr-types/keypair"]
types-random = ["hopr-types/random"]
types-telemetry = ["hopr-types/telemetry"]
types-with-bindings = [
    "types-chain",
    "hopr-types/use-bindings",
]

[lib]
name = "hopr_api"
crate-type = ["rlib"]
path = "src/lib.rs"

[dependencies.async-trait]
version = "0.1.89"

[dependencies.atomic_enum]
version = "0.3.0"
optional = true

[dependencies.auto_impl]
version = "1.3.0"
optional = true

[dependencies.chrono]
version = "0.4.44"
features = [
    "std",
    "clock",
]
default-features = false

[dependencies.futures]
version = "0.3.32"
features = [
    "std",
    "async-await",
]
default-features = false

[dependencies.futures-concurrency]
version = "7.7.1"

[dependencies.hopr-types]
version = "1.8.2"
features = [
    "crypto",
    "internal",
    "primitive",
    "rayon",
]

[dependencies.libp2p-identity]
version = "0.2.13"
features = [
    "peerid",
    "ed25519",
    "rand",
]

[dependencies.multiaddr]
version = "0.18.2"

[dependencies.serde]
version = "1.0.228"
features = ["derive"]
optional = true

[dependencies.strum]
version = "0.28.0"
features = ["derive"]

[dependencies.thiserror]
version = "2.0.18"

[dependencies.tracing]
version = "0.1.44"
features = [
    "std",
    "release_max_level_debug",
]
default-features = false

[dev-dependencies.anyhow]
version = "1.0.102"

[dev-dependencies.insta]
version = "1.47.2"
features = [
    "json",
    "yaml",
    "redactions",
]

[dev-dependencies.mockall]
version = "0.14.0"

[dev-dependencies.serde]
version = "1.0.228"
features = ["derive"]

[dev-dependencies.tokio]
version = "1.52.1"
features = [
    "macros",
    "rt-multi-thread",
]

[profile.dev]
opt-level = 0
debug = 2

[profile.dev.package.insta]
opt-level = 3

[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
