-
-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathCargo.toml
More file actions
277 lines (246 loc) · 8.04 KB
/
Copy pathCargo.toml
File metadata and controls
277 lines (246 loc) · 8.04 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
[workspace]
members = ["crates/*"]
default-members = ["crates/r402"]
resolver = "3"
[workspace.package]
# Fields below are shared across every member crate via `field.workspace =
# true`. `keywords` and `categories` are deliberately *per-crate* (each
# crate's audience is different — solana people don't search for
# "ethereum") and so live in the individual `Cargo.toml` files.
version = "0.15.0"
edition = "2024"
rust-version = "1.91"
license = "MIT OR Apache-2.0"
repository = "https://github.com/qntx/r402"
homepage = "https://github.com/qntx/r402"
description = "x402 Payment Protocol SDK for Rust."
[workspace.dependencies]
# Internal crates
r402 = { version = "0.15.0", path = "crates/r402" }
r402-casper = { version = "0.15.0", path = "crates/r402-casper" }
r402-core = { version = "0.15.0", path = "crates/r402-core" }
r402-evm = { version = "0.15.0", path = "crates/r402-evm" }
r402-http = { version = "0.15.0", path = "crates/r402-http" }
r402-mcp = { version = "0.15.0", path = "crates/r402-mcp" }
r402-svm = { version = "0.15.0", path = "crates/r402-svm" }
r402-tron = { version = "0.15.0", path = "crates/r402-tron" }
# Core
# `async-trait` is only kept for implementing external traits (e.g. alloy
# `NonceManager`, `reqwest_middleware::Middleware`) that pre-date AFIT.
# All internal traits use native `async fn` in traits (AFIT).
async-trait = "0.1"
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1", features = ["raw_value"] }
serde_with = "3"
thiserror = "2"
# Runtime
futures-util = "0.3"
tokio = { version = "1", features = ["sync", "rt-multi-thread"] }
# Web
axum-core = "0.5"
http = "1.4"
reqwest = { version = "0.13", features = ["json"] }
reqwest-middleware = "0.5"
tower = "0.5"
url = { version = "2", features = ["serde"] }
# Official Model Context Protocol Rust SDK (modelcontextprotocol/rust-sdk).
# Used by r402-mcp the same way Go uses modelcontextprotocol/go-sdk.
rmcp = { version = "3.1", default-features = false }
# Utility
base64 = "0.23"
blake2 = "0.10"
sha3 = "0.11"
# Solana's entire ecosystem still ships bincode 1 (legacy serde wire
# format). Upgrading to bincode 3 here would split the workspace across
# two incompatible serialization stacks — keep v1 until upstream moves.
bincode = "1"
compact_str = { version = "0.10", features = ["serde"] }
dashmap = "6"
moka = { version = "0.12", features = ["sync"] }
rand = "0.10"
rust_decimal = "1"
wiremock = "0.6"
# Alloy (EVM)
#
# alloy-core (primitives, sol-types) is on its own 1.5 release train and
# stays there. The upper alloy stack (network, provider, transport,
# signer, rpc-*) is on the 2.x line as of the Glamsterdam-hardfork
# preparation release (alloy-rs/alloy v2.0.0).
alloy-contract = "2.0"
alloy-network = "2.0"
alloy-primitives = { version = "1.5", features = ["k256", "serde"] }
alloy-provider = "2.0"
alloy-rpc-client = "2.0"
alloy-rpc-types-eth = "2.0"
alloy-signer = "2.0"
alloy-signer-local = "2.0"
alloy-sol-types = "1.5"
alloy-transport = { version = "2.0", features = ["throttle"] }
alloy-transport-http = "2.0"
# Solana (SVM)
solana-account = "3"
solana-client = "3"
solana-commitment-config = "3"
solana-compute-budget-interface = "3"
solana-keypair = "3"
solana-message = "3"
solana-pubkey = "4"
solana-signature = "3"
solana-signer = "3"
solana-transaction = "3"
spl-token = { version = "9", features = ["no-entrypoint"] }
# Interface-only sub-crate of `spl-token-2022`. We exclusively need its
# program ID, `Mint::unpack`, and `transfer_checked` instruction builder,
# all of which live here without dragging in the processor (and the broken
# `token_group/processor.rs` in `spl-token-2022 v10.0.0`), confidential
# transfer, or ZK proof code. Drops dozens of transitive deps too.
spl-token-2022-interface = "2.1"
# Telemetry
tracing = "0.1"
tracing-core = "0.1"
# Metrics facade — backend-agnostic instrumentation (Prometheus, StatsD,
# OpenTelemetry, ...). Crates pull this through a `metrics` feature flag
# so the dep stays optional for downstream consumers that don't ship a
# recorder.
metrics = "0.24"
# Property-based testing — only consumed via dev-dependencies, but
# pinned at the workspace root so all crates run with the same version
# and configuration.
proptest = "1"
[profile.release]
codegen-units = 1
lto = "thin"
panic = "abort"
strip = true
[profile.dev]
debug = true
opt-level = 0
[profile.test]
opt-level = 2
[profile.ci]
debug = false
inherits = "dev"
[profile.bench]
debug = true
inherits = "release"
[workspace.lints.rust]
unsafe_code = "deny"
elided_lifetimes_in_paths = "warn"
single_use_lifetimes = "warn"
unused_lifetimes = "warn"
missing_copy_implementations = "warn"
missing_debug_implementations = "warn"
missing_docs = "warn"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
variant_size_differences = "warn"
unused_qualifications = "warn"
unused_imports = "warn"
unused_macro_rules = "warn"
unused_must_use = "deny"
unreachable_pub = "warn"
unused_crate_dependencies = "warn"
non_ascii_idents = "deny"
non_camel_case_types = "warn"
non_snake_case = "warn"
non_upper_case_globals = "warn"
keyword_idents = { level = "warn", priority = -1 }
macro_use_extern_crate = "warn"
meta_variable_misuse = "warn"
rust_2018_idioms = { level = "deny", priority = -1 }
rust_2024_compatibility = { level = "warn", priority = -1 }
[workspace.lints.rustdoc]
all = { level = "warn", priority = -1 }
broken_intra_doc_links = "warn"
private_intra_doc_links = "warn"
missing_crate_level_docs = "warn"
invalid_codeblock_attributes = "warn"
invalid_html_tags = "warn"
invalid_rust_codeblocks = "warn"
bare_urls = "warn"
unescaped_backticks = "warn"
[workspace.lints.clippy]
correctness = { level = "deny", priority = -1 }
suspicious = { level = "deny", priority = -1 }
complexity = { level = "warn", priority = -1 }
perf = { level = "warn", priority = -1 }
style = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
cargo = { level = "warn", priority = -1 }
restriction = { level = "allow", priority = -1 }
dbg_macro = "warn"
print_stderr = "warn"
print_stdout = "warn"
todo = "warn"
unimplemented = "warn"
panic = "warn"
unwrap_used = "warn"
unwrap_in_result = "warn"
expect_used = "warn"
panic_in_result_fn = "warn"
indexing_slicing = "warn"
exit = "warn"
undocumented_unsafe_blocks = "warn"
multiple_unsafe_ops_per_block = "warn"
mem_forget = "warn"
clone_on_ref_ptr = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
fallible_impl_from = "warn"
error_impl_error = "warn"
let_underscore_must_use = "warn"
rest_pat_in_fully_bound_structs = "warn"
fn_params_excessive_bools = "warn"
struct_excessive_bools = "warn"
large_types_passed_by_value = "warn"
implicit_hasher = "warn"
redundant_type_annotations = "warn"
str_to_string = "warn"
string_lit_as_bytes = "warn"
needless_raw_string_hashes = "warn"
format_push_string = "warn"
cast_possible_truncation = "warn"
cast_sign_loss = "warn"
cast_lossless = "warn"
as_underscore = "warn"
cast_precision_loss = "allow"
future_not_send = "warn"
await_holding_lock = "warn"
await_holding_refcell_ref = "warn"
significant_drop_tightening = "warn"
match_wildcard_for_single_variants = "warn"
match_same_arms = "warn"
option_if_let_else = "warn"
wildcard_enum_match_arm = "allow"
cognitive_complexity = "warn"
too_many_lines = "warn"
excessive_nesting = "warn"
used_underscore_binding = "warn"
verbose_file_reads = "warn"
tests_outside_test_module = "warn"
unnecessary_self_imports = "warn"
infinite_loop = "warn"
allow_attributes_without_reason = "warn"
missing_assert_message = "warn"
empty_line_after_doc_comments = "warn"
empty_line_after_outer_attr = "warn"
missing_docs_in_private_items = "allow"
missing_errors_doc = "warn"
missing_panics_doc = "warn"
missing_safety_doc = "warn"
doc_markdown = "warn"
must_use_candidate = "warn"
return_self_not_must_use = "warn"
exhaustive_enums = "allow"
exhaustive_structs = "allow"
module_name_repetitions = "allow"
similar_names = "allow"
shadow_reuse = "allow"
shadow_same = "allow"
shadow_unrelated = "warn"
multiple_crate_versions = "allow"
cargo_common_metadata = "allow"
semicolon_inside_block = "allow"
semicolon_outside_block = "allow"
redundant_pub_crate = "allow"