-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathCargo.toml
More file actions
102 lines (85 loc) · 3.33 KB
/
Cargo.toml
File metadata and controls
102 lines (85 loc) · 3.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
[package]
name = "mpp"
version = "0.10.0"
edition = "2021"
description = "Rust SDK for the Machine Payments Protocol (MPP)"
license = "MIT OR Apache-2.0"
repository = "https://github.com/tempoxyz/mpp-rs"
homepage = "https://github.com/tempoxyz/mpp-rs"
documentation = "https://tempoxyz.github.io/mpp-rs"
readme = "README.md"
keywords = ["http", "payments", "402", "authentication"]
categories = ["web-programming", "authentication", "cryptography"]
[workspace]
members = [
".",
"examples/axum-extractor",
"examples/basic",
"examples/session/multi-fetch",
"examples/session/sse",
"examples/stripe",
]
default-members = ["."]
exclude = ["fuzz"]
resolver = "2"
[features]
default = ["reqwest-default-tls"]
# Side selection
client = ["dep:reqwest"]
server = ["tokio", "futures-core", "async-stream"]
# Method implementations
evm = ["alloy", "hex", "rand"]
tempo = ["evm", "tempo-alloy", "tempo-primitives", "uuid"]
stripe = ["dep:reqwest"]
# Utilities
utils = ["hex", "rand"]
# Middleware support (requires client)
middleware = ["client", "reqwest-middleware", "async-trait", "anyhow", "http-types"]
# Tower middleware support (server-side)
tower = ["dep:tower-layer", "dep:tower-service", "http-types", "dep:http-body", "server"]
# Axum middleware support (server-side convenience)
axum = ["dep:axum-core", "server", "http-types"]
reqwest-default-tls = ["reqwest?/default-tls"]
reqwest-native-tls = ["reqwest?/native-tls"]
reqwest-rustls-tls = ["reqwest?/rustls-tls"]
# Integration tests (requires a running Tempo localnet)
integration = ["tempo", "server", "client", "axum"]
integration-stripe = ["stripe", "server", "client", "axum"]
[dependencies]
# Core dependencies (always included)
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["preserve_order"] }
serde_json_canonicalizer = "0.3"
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.9", optional = true }
uuid = { version = "1", features = ["v4"], optional = true }
tokio = { version = "1", features = ["rt", "sync", "time", "macros"], optional = true }
futures-core = { version = "0.3", optional = true }
async-stream = { version = "0.3", optional = true }
alloy = { version = "2.0", features = ["full"], optional = true }
# Tempo dependencies (optional)
tempo-alloy = { version = "1.6.0", optional = true }
tempo-primitives = { version = "1.6.0", optional = true }
# HTTP client dependencies (optional)
reqwest = { version = "0.12", default-features = false, 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 }
# Tower middleware dependencies (optional)
tower-layer = { version = "0.3", optional = true }
tower-service = { version = "0.3", optional = true }
http-body = { version = "1", optional = true }
# Axum dependencies (optional)
axum-core = { version = "0.5", optional = true }
[dev-dependencies]
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net"] }
axum = { version = "0.8" }
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
hex = "0.4"