[package]
name = "l402kit"
version = "1.4.0"
edition = "2021"
description = "L402 (HTTP 402 + Lightning Network) middleware for Rust. Supports axum."
license = "MIT"
repository = "https://github.com/shinydapps/l402-kit"
readme = "README.md"
keywords = ["lightning", "l402", "http402", "bitcoin", "middleware"]
categories = ["web-programming", "network-programming"]

[dependencies]
sha2 = "0.10"
hex = "0.4"
base64 = "0.22"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "2"
once_cell = "1"

# Optional axum middleware support
axum = { version = "0.8", optional = true }
reqwest = { version = "0.12", features = ["json"], optional = true }
http = { version = "1", optional = true }

[features]
default = ["axum-middleware"]
axum-middleware = ["dep:axum", "dep:reqwest", "dep:http"]

[dev-dependencies]
tokio = { version = "1", features = ["full"] }
axum = "0.8"
tower = { version = "0.5", features = ["util"] }

[[example]]
name = "basic"
required-features = ["axum-middleware"]
