Skip to content

Commit 2837dbe

Browse files
committed
Improve attested RPC client
1 parent a71435d commit 2837dbe

File tree

4 files changed

+266
-60
lines changed

4 files changed

+266
-60
lines changed

Cargo.lock

Lines changed: 100 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,42 @@ time = "0.3.44"
5050
once_cell = "1.21.3"
5151
axum = "0.8.6"
5252
tower-http = { version = "0.6.7", features = ["fs"] }
53+
54+
# For websockets
5355
tokio-tungstenite = { version = "0.28.0", optional = true }
5456
futures-util = { version = "0.3.31", optional = true }
5557

56-
alloy-rpc-client = "1.1.3"
57-
alloy-json-rpc = "1.1.3"
58-
alloy-transport = "1.1.3"
59-
tower-service = "0.3.3"
60-
alloy-transport-http = { version = "1.4.3", features = ["hyper"]}
61-
url = "2.5.8"
58+
# For JSON RPC
59+
alloy-rpc-client = { version = "1.1.3", optional = true }
60+
alloy-json-rpc = { version = "1.1.3", optional = true }
61+
alloy-transport = { version = "1.1.3", optional = true }
62+
tower-service = { version = "0.3.3", optional = true }
63+
alloy-transport-http = { version = "1.4.3", features = [
64+
"hyper",
65+
], optional = true }
66+
url = { version = "2.5.8", optional = true }
6267

6368
[dev-dependencies]
6469
rcgen = "0.14.5"
6570
tempfile = "3.23.0"
6671
tdx-quote = { version = "0.0.5", features = ["mock"] }
72+
jsonrpsee = { version = "0.26.0", features = ["server"] }
6773

6874
[features]
69-
default = ["azure", "ws"]
75+
default = ["azure", "ws", "rpc"]
7076

7177
# Adds support for Microsoft Azure attestation generation and verification
7278
azure = ["tss-esapi", "az-tdx-vtpm"]
7379

7480
# Adds websocket support
7581
ws = ["tokio-tungstenite", "futures-util"]
82+
83+
# Adds JSON RPC support
84+
rpc = [
85+
"alloy-json-rpc",
86+
"alloy-rpc-client",
87+
"alloy-transport",
88+
"tower-service",
89+
"alloy-transport-http",
90+
"url",
91+
]

0 commit comments

Comments
 (0)