[package]
name        = "ladon"
version     = "0.2.7"
edition     = "2024"
authors     = ["Melon Ask"]
description = "Fast multi-chain HD wallet CLI and address-pool daemon: EVM, Bitcoin, Solana"
license     = "MIT"
repository  = "https://github.com/melonask/ladon"
readme      = "README.md"
homepage    = "https://github.com/melonask/ladon"
keywords    = ["crypto", "hd-wallet", "ethereum", "bitcoin", "solana"]
categories  = ["command-line-utilities", "cryptography"]
rust-version = "1.96"

[features]
# SQLite-backed pool mode is the default. Use --features pg for Postgres.
default = ["pool", "sqlite"]
pool = ["dep:tokio", "dep:sqlx", "dep:ulid", "dep:chrono"]
sqlite = ["pool", "sqlx/sqlite"]
postgres = ["pool", "sqlx/postgres"]
pg = ["postgres"]
full = ["sqlite", "postgres"]

# ── Crypto / HD wallet ──────────────────────────────────────────────────────────
[dependencies]
bip39         = { version = "2.2",  features = ["rand"] }
bitcoin       = { version = "0.32", features = ["std", "rand"], default-features = false }
ed25519-dalek = "2.2"
solana-pubkey = { version = "4.2",  features = ["curve25519", "sha2"] }
tiny-keccak   = { version = "2.0",  features = ["keccak"] }
hmac          = "0.13"
sha2          = "0.11"
aes-gcm       = "0.10"
scrypt        = "0.12"
hex           = "0.4"
base64        = "0.22"
rand          = "0.10"
zeroize       = { version = "1.8", features = ["derive"] }

# ── Serialisation ───────────────────────────────────────────────────────────────
serde      = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml       = "1.1"

# ── CLI ─────────────────────────────────────────────────────────────────────────
clap = { version = "4.5", features = ["derive", "env"] }

# ── Async runtime (pool feature) ────────────────────────────────────────────────
tokio = { version = "1.52", features = ["rt-multi-thread", "macros", "time", "signal"], optional = true }

# ── Database (pool feature, feature-gated backends) ─────────────────────────────
sqlx = { version = "0.9", default-features = false, features = ["runtime-tokio", "tls-rustls", "any", "uuid", "chrono"], optional = true }
ulid = { version = "1.2", optional = true }
chrono = { version = "0.4", default-features = false, features = ["clock"], optional = true }

# ── Observability ───────────────────────────────────────────────────────────────
tracing            = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }

# ── Utilities ───────────────────────────────────────────────────────────────────
anyhow   = "1.0"
thiserror = "2.0"

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

[[bin]]
name = "ladon"
path = "src/main.rs"
required-features = ["pool"]

[profile.release]
opt-level     = "z"
lto           = true
codegen-units = 1
strip         = true
panic         = "abort"

[dev-dependencies]
serde_json = "1.0"
tokio      = { version = "1.52", features = ["rt-multi-thread", "macros", "time", "signal"] }

[lints.rust]
unused_must_use = "deny"
# Documentation standardization target: add public API docs, then enable
# `missing_docs = "warn"` to match the strict documentation posture used by
# crates with complete public item coverage.
