Skip to content

Commit 5f0bcce

Browse files
committed
feat: eip712domain_info API Endpoint
Signed-off-by: Arvin Morawej <[email protected]>
1 parent 7855fc6 commit 5f0bcce

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tap_aggregator/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ path = "src/main.rs"
1313

1414
[dependencies]
1515
alloy.workspace = true
16+
alloy-sol-types ={ version = "0.8.21", features = ["eip712-serde"]}
1617
anyhow.workspace = true
1718
axum = { version = "0.7.5", features = [
1819
"http1",

tap_aggregator/src/server.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ pub trait Rpc {
7878
#[method(name = "api_versions")]
7979
fn api_versions(&self) -> JsonRpcResult<TapRpcApiVersionsInfo>;
8080

81+
/// Returns the EIP-712 domain separator information used by this server.
82+
/// The client is able to verify the signatures of the receipts and receipt aggregate vouchers.
83+
#[method(name = "eip712domain_info")]
84+
fn eip712_domain_info(&self) -> JsonRpcResult<Eip712Domain>;
85+
8186
/// Aggregates the given receipts into a receipt aggregate voucher.
8287
/// Returns an error if the user expected API version is not supported.
8388
#[method(name = "aggregate_receipts")]
@@ -289,6 +294,10 @@ impl RpcServer for RpcImpl {
289294
Ok(JsonRpcResponse::ok(tap_rpc_api_versions_info()))
290295
}
291296

297+
fn eip712_domain_info(&self) -> JsonRpcResult<Eip712Domain> {
298+
Ok(JsonRpcResponse::ok(self.domain_separator.clone()))
299+
}
300+
292301
fn aggregate_receipts(
293302
&self,
294303
api_version: String,

0 commit comments

Comments
 (0)