mpay 0.2.0

Machine Payment Protocol - Rust library for Web Payment Auth
Documentation
[package]
name = "mpay"
version = "0.2.0"
edition = "2021"
description = "Machine Payment Protocol - Rust library for Web Payment Auth"
license = "MIT OR Apache-2.0"
repository = "https://github.com/tempoxyz/mpay-rs"
homepage = "https://github.com/tempoxyz/mpay-rs"
documentation = "https://docs.rs/mpay"
readme = "README.md"
keywords = ["http", "payments", "402", "authentication", "web3"]
categories = ["web-programming", "authentication", "cryptography"]

[features]
default = []

# Side selection
client = ["reqwest"]
server = []

# Method implementations
evm = ["alloy", "alloy-signer-local", "hex", "rand"]
tempo = ["evm", "tempo-alloy", "tempo-primitives", "uuid"]

# Utilities
utils = ["hex", "rand"]

# Middleware support (requires client)
middleware = ["client", "reqwest-middleware", "async-trait", "anyhow", "http-types"]

[dependencies]
# Core dependencies (always included)
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"] }
thiserror = "2"
time = { version = "0.3", features = ["formatting", "parsing"] }
hmac = "0.12"
sha2 = "0.10"

# Optional dependencies
hex = { version = "0.4", optional = true }
base64 = "0.22"
rand = { version = "0.8", optional = true }
uuid = { version = "1", features = ["v4"], optional = true }
alloy = { version = "1.2", features = ["full"], optional = true }
alloy-signer-local = { version = "1.2", optional = true }

# Tempo dependencies (optional)
# Note: tempo feature requires git dependency - add to your Cargo.toml:
#   [patch.crates-io]
#   tempo-alloy = { git = "https://github.com/tempoxyz/tempo" }
#   tempo-primitives = { git = "https://github.com/tempoxyz/tempo" }
tempo-alloy = { version = "0", optional = true }
tempo-primitives = { version = "0", optional = true }

# HTTP client dependencies (optional)
reqwest = { version = "0.12", features = ["json"], optional = true }
reqwest-middleware = { version = "0.4", optional = true }
async-trait = { version = "0.1", optional = true }
anyhow = { version = "1", optional = true }
http-types = { package = "http", version = "1", optional = true }

[dev-dependencies]
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }