[package]
name = "init4-bin-base"

description = "Internal utilities for binaries produced by the init4 team"
keywords = ["init4", "bin", "base"]
version = "0.19.1"
edition = "2021"
rust-version = "1.85"
authors = ["init4", "James Prestwich", "evalir"]
license = "MIT OR Apache-2.0"
homepage = "https://github.com/init4tech/bin-base"
repository = "https://github.com/init4tech/bin-base"

[dependencies]
init4-from-env-derive = { version = "0.2.0", path = "from-env-derive" }

# Signet
signet-cold-sql = { version = "0.7.1", optional = true, default-features = false, features = ["postgres", "sqlite"] }
signet-constants = { version = "0.16.0" }
signet-tx-cache = { version = "0.16.0", optional = true }

# alloy
alloy = { version = "1.0.35", optional = true, default-features = false, features = ["std", "signer-local", "consensus", "network"] }

# Tracing
tracing = "0.1.40"
tracing-core = "0.1.33"
tracing-subscriber = { version = "0.3.18", features = ["env-filter", "json", "registry"] }

# OTLP
opentelemetry_sdk = "0.30.0"
opentelemetry = "0.30.0"
opentelemetry-http = "0.30.0"
opentelemetry-otlp = "0.30.0"
opentelemetry-semantic-conventions = { version = "0.30.0", features = ["semconv_experimental"] }
tracing-opentelemetry = "0.31.0"
url = "2.5.4"

# Metrics
metrics = "0.24.1"
metrics-exporter-prometheus = "0.18.0"

# Slot Calc
chrono = "0.4.40"

# OAuth
oauth2 = { version = "5.0.0", optional = true }
tokio = { version = "1.36.0", optional = true }

# Other
axum = "0.8.1"
eyre = { version = "0.6.12", optional = true }
serde = { version = "1", features = ["derive"] }
thiserror = "2.0.11"
tower = "0.5.2"
async-trait = { version = "0.1.80", optional = true }

# AWS
# Use `default-https-client` rather than the defaulted `rustls` feature to avoid legacy versions of
# the `hyper` and `rustls` dependencies.
aws-config = { version = "1.1.7", optional = true, default-features = false, features = ["default-https-client", "rt-tokio"] }
aws-sdk-kms = { version = "1.15.0", optional = true, default-features = false, features = ["default-https-client", "rt-tokio"] }
futures-util = { version = "0.3", optional = true }
reqwest = { version = "0.12.15", optional = true }
rustls = { version = "0.23.31", optional = true }

[dev-dependencies]
ajj = { version = "0.7.0", features = ["axum", "ws", "ipc"] }
axum = "0.8.1"
eyre = "0.6.12"
serial_test = "3.2.0"
signal-hook = "0.4.1"
tokio = { version = "1.43.0", features = ["macros"] }

[features]
default = ["alloy", "rustls"]
alloy = ["dep:alloy"]
aws = ["alloy", "alloy?/signer-aws", "dep:async-trait", "dep:aws-config", "dep:aws-sdk-kms"]
perms = ["dep:eyre", "dep:oauth2", "dep:tokio", "dep:reqwest", "dep:signet-tx-cache", "dep:futures-util"]
sse = ["perms", "signet-tx-cache/sse"]
pylon = ["perms", "alloy/kzg"]
block_watcher = ["dep:tokio"]
rustls = ["dep:rustls", "rustls/aws-lc-rs"]
cold-sql = ["dep:signet-cold-sql"]

[[example]]
name = "oauth"
path = "examples/oauth.rs"
required-features = ["perms"]

[[example]]
name = "tx_cache"
path = "examples/tx_cache.rs"
required-features = ["perms"]

# [patch.crates-io]
# signet-bundle = { path = "../sdk/crates/bundle"}
# signet-constants = { path = "../sdk/crates/constants"}
# signet-evm = { path = "../sdk/crates/evm"}
# signet-extract = { path = "../sdk/crates/extract"}
# signet-tx-cache = { path = "../sdk/crates/tx-cache"}
# signet-types = { path = "../sdk/crates/types"}
# signet-zenith = { path = "../sdk/crates/zenith"}
