pub struct AgentManager<S: HyperliquidSigner> { /* private fields */ }Expand description
Manages agent lifecycle with automatic rotation
Implementations§
Source§impl<S: HyperliquidSigner + Clone> AgentManager<S>
impl<S: HyperliquidSigner + Clone> AgentManager<S>
Sourcepub fn new(master_signer: S, config: AgentConfig, network: Network) -> Self
pub fn new(master_signer: S, config: AgentConfig, network: Network) -> Self
Create a new agent manager
Sourcepub async fn get_or_rotate_agent(
&self,
name: &str,
) -> Result<AgentWallet, HyperliquidError>
pub async fn get_or_rotate_agent( &self, name: &str, ) -> Result<AgentWallet, HyperliquidError>
Get or create an agent, rotating if necessary
Sourcepub async fn get_active_agents(&self) -> Vec<(String, AgentWallet)>
pub async fn get_active_agents(&self) -> Vec<(String, AgentWallet)>
Get all active agents
Sourcepub async fn mark_deregistered(&self, name: &str)
pub async fn mark_deregistered(&self, name: &str)
Mark an agent as deregistered
Sourcepub async fn cleanup_deregistered(&self)
pub async fn cleanup_deregistered(&self)
Clean up deregistered agents
Auto Trait Implementations§
impl<S> Freeze for AgentManager<S>where
S: Freeze,
impl<S> !RefUnwindSafe for AgentManager<S>
impl<S> Send for AgentManager<S>
impl<S> Sync for AgentManager<S>
impl<S> Unpin for AgentManager<S>where
S: Unpin,
impl<S> !UnwindSafe for AgentManager<S>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more