pub struct RiskEngine { /* private fields */ }Expand description
Risk scoring engine configuration
Implementations§
Source§impl RiskEngine
impl RiskEngine
Sourcepub fn with_optional_client(client: Option<BlockchainDataClient>) -> Self
pub fn with_optional_client(client: Option<BlockchainDataClient>) -> Self
A risk engine that uses Etherscan data when there is a client,
and basic scoring when there is none.
Sourcepub fn from_env() -> Self
👎Deprecated since 0.8.0: pass the transport: use RiskEngine::from_env_with_http
pub fn from_env() -> Self
pass the transport: use RiskEngine::from_env_with_http
A risk engine with Etherscan data when ETHERSCAN_KEY_ENV is set.
Sourcepub fn from_env_with_http(http: Arc<dyn HttpClient>) -> Self
pub fn from_env_with_http(http: Arc<dyn HttpClient>) -> Self
RiskEngine::from_env, sending Etherscan requests through http.
Source§impl RiskEngine
impl RiskEngine
Sourcepub fn with_data_client(client: BlockchainDataClient) -> Self
pub fn with_data_client(client: BlockchainDataClient) -> Self
Create new risk engine with data sources for enhanced analysis
Sourcepub async fn assess_address(
&self,
address: &str,
chain: &str,
) -> Result<RiskAssessment>
pub async fn assess_address( &self, address: &str, chain: &str, ) -> Result<RiskAssessment>
Assess risk for a single address
Trait Implementations§
Source§impl Debug for RiskEngine
impl Debug for RiskEngine
Auto Trait Implementations§
impl !RefUnwindSafe for RiskEngine
impl !UnwindSafe for RiskEngine
impl Forget for RiskEngine
impl Freeze for RiskEngine
impl Send for RiskEngine
impl Sync for RiskEngine
impl Unpin for RiskEngine
impl UnsafeUnpin for RiskEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more