Skip to content

Commit fcc64b0

Browse files
committed
refactor: rename escrow handler to signature checker
Signed-off-by: Gustavo Inacio <[email protected]>
1 parent 23e2076 commit fcc64b0

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

tap_core/src/manager/adapters/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
//! allows for easy integration with various storage solutions and verification
99
//! procedures, thereby making the library adaptable to a wide range of use cases.
1010
11-
mod escrow;
11+
mod signature;
1212
mod rav;
1313
mod receipt;
1414

15-
pub use escrow::EscrowHandler;
15+
pub use signature::SignatureChecker;
1616
pub use rav::*;
1717
pub use receipt::*;

tap_core/src/manager/adapters/escrow.rs renamed to tap_core/src/manager/adapters/signature.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::{signed_message::EIP712SignedMessage, Error};
1313
/// For example code see [crate::manager::context::memory::EscrowStorage]
1414
1515
#[async_trait]
16-
pub trait EscrowHandler: Send + Sync {
16+
pub trait SignatureChecker: Send + Sync {
1717
/// Defines the user-specified error type.
1818
///
1919
/// This error type should implement the `Error` and `Debug` traits from

tap_core/src/manager/context/memory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ impl InMemoryContext {
241241
}
242242

243243
#[async_trait]
244-
impl EscrowHandler for InMemoryContext {
244+
impl SignatureChecker for InMemoryContext {
245245
type AdapterError = InMemoryError;
246246

247247
async fn verify_signer(&self, signer_address: Address) -> Result<bool, Self::AdapterError> {

tap_core/src/manager/tap_manager.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
use alloy::dyn_abi::Eip712Domain;
55

6-
use super::adapters::{EscrowHandler, RAVRead, RAVStore, ReceiptDelete, ReceiptRead, ReceiptStore};
6+
use super::adapters::{SignatureChecker, RAVRead, RAVStore, ReceiptDelete, ReceiptRead, ReceiptStore};
77
use crate::{
88
rav::{RAVRequest, ReceiptAggregateVoucher, SignedRAV},
99
receipt::{
@@ -42,7 +42,7 @@ impl<E> Manager<E> {
4242

4343
impl<E> Manager<E>
4444
where
45-
E: RAVStore + EscrowHandler,
45+
E: RAVStore + SignatureChecker,
4646
{
4747
/// Verify `signed_rav` matches all values on `expected_rav`, and that `signed_rav` has a valid signer.
4848
///
@@ -95,7 +95,7 @@ where
9595

9696
impl<E> Manager<E>
9797
where
98-
E: ReceiptRead + EscrowHandler,
98+
E: ReceiptRead + SignatureChecker,
9999
{
100100
async fn collect_receipts(
101101
&self,
@@ -156,7 +156,7 @@ where
156156

157157
impl<E> Manager<E>
158158
where
159-
E: ReceiptRead + RAVRead + EscrowHandler,
159+
E: ReceiptRead + RAVRead + SignatureChecker,
160160
{
161161
/// Completes remaining checks on all receipts up to
162162
/// (current time - `timestamp_buffer_ns`). Returns them in two lists

tap_integration_tests/tests/indexer_mock.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use jsonrpsee::{
1717
use tap_aggregator::jsonrpsee_helpers;
1818
use tap_core::{
1919
manager::{
20-
adapters::{EscrowHandler, RAVRead, RAVStore, ReceiptRead, ReceiptStore},
20+
adapters::{SignatureChecker, RAVRead, RAVStore, ReceiptRead, ReceiptStore},
2121
Manager,
2222
},
2323
rav::SignedRAV,
@@ -83,7 +83,7 @@ where
8383
#[async_trait]
8484
impl<E> RpcServer for RpcManager<E>
8585
where
86-
E: ReceiptStore + ReceiptRead + RAVStore + RAVRead + EscrowHandler + Send + Sync + 'static,
86+
E: ReceiptStore + ReceiptRead + RAVStore + RAVRead + SignatureChecker + Send + Sync + 'static,
8787
{
8888
async fn request(
8989
&self,
@@ -147,7 +147,7 @@ where
147147
+ ReceiptRead
148148
+ RAVStore
149149
+ RAVRead
150-
+ EscrowHandler
150+
+ SignatureChecker
151151
+ Clone
152152
+ Send
153153
+ Sync
@@ -182,7 +182,7 @@ async fn request_rav<E>(
182182
threshold: usize,
183183
) -> Result<()>
184184
where
185-
E: ReceiptRead + RAVRead + RAVStore + EscrowHandler,
185+
E: ReceiptRead + RAVRead + RAVStore + SignatureChecker,
186186
{
187187
// Create the aggregate_receipts request params
188188
let rav_request = manager

0 commit comments

Comments
 (0)