eigen_services_operatorsinfo/
operator_info.rs

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
use alloy_primitives::Address;
use async_trait::async_trait;
use eigen_types::operator::OperatorPubKeys;

use crate::operatorsinfo_inmemory::OperatorInfoServiceError;

#[async_trait]
pub trait OperatorInfoService {
    /// Get the operator info from the operator id
    ///
    /// # Arguments
    ///
    /// * `operator_id` - The operator id
    ///
    /// # Returns
    ///
    /// The operator public keys
    async fn get_operator_info(
        &self,
        address: Address,
    ) -> Result<Option<OperatorPubKeys>, OperatorInfoServiceError>;

    async fn get_operator_socket(
        &self,
        address: Address,
    ) -> Result<Option<String>, OperatorInfoServiceError>;
}