pub struct RpcClient { /* private fields */ }Expand description
RPC client for communicating with QuDAG nodes
Implementations§
Source§impl RpcClient
impl RpcClient
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set request timeout
Sourcepub fn with_retry(self, attempts: u32, delay: Duration) -> Self
pub fn with_retry(self, attempts: u32, delay: Duration) -> Self
Set retry configuration
Sourcepub fn with_auth_token(self, token: String) -> Self
pub fn with_auth_token(self, token: String) -> Self
Set authentication token
Sourcepub fn with_ml_dsa_auth(self, client_id: String, keypair: MlDsaKeyPair) -> Self
pub fn with_ml_dsa_auth(self, client_id: String, keypair: MlDsaKeyPair) -> Self
Set ML-DSA authentication
Sourcepub async fn get_status(&self) -> Result<NodeStatus>
pub async fn get_status(&self) -> Result<NodeStatus>
Get node status
Sourcepub async fn start_node(&self, config: NodeConfig) -> Result<()>
pub async fn start_node(&self, config: NodeConfig) -> Result<()>
Start node
Sourcepub async fn restart_node(&self) -> Result<()>
pub async fn restart_node(&self) -> Result<()>
Restart node
Sourcepub async fn remove_peer(&self, peer_id: String) -> Result<String>
pub async fn remove_peer(&self, peer_id: String) -> Result<String>
Remove peer
Sourcepub async fn list_peers(&self) -> Result<Vec<PeerInfo>>
pub async fn list_peers(&self) -> Result<Vec<PeerInfo>>
List peers
Sourcepub async fn get_peer_info(&self, peer_id: String) -> Result<PeerInfo>
pub async fn get_peer_info(&self, peer_id: String) -> Result<PeerInfo>
Get peer information
Sourcepub async fn unban_peer(&self, address: String) -> Result<String>
pub async fn unban_peer(&self, address: String) -> Result<String>
Unban peer
Sourcepub async fn get_network_stats(&self) -> Result<NetworkStats>
pub async fn get_network_stats(&self) -> Result<NetworkStats>
Get network statistics
Sourcepub async fn test_network(&self) -> Result<Vec<NetworkTestResult>>
pub async fn test_network(&self) -> Result<Vec<NetworkTestResult>>
Test network connectivity
Sourcepub async fn get_wallet_info(&self) -> Result<WalletInfo>
pub async fn get_wallet_info(&self) -> Result<WalletInfo>
Get wallet information
Sourcepub async fn create_wallet(&self, password: String) -> Result<String>
pub async fn create_wallet(&self, password: String) -> Result<String>
Create new wallet
Sourcepub async fn import_wallet(&self, seed: String, password: String) -> Result<()>
pub async fn import_wallet(&self, seed: String, password: String) -> Result<()>
Import wallet from seed
Sourcepub async fn export_wallet(&self, password: String) -> Result<String>
pub async fn export_wallet(&self, password: String) -> Result<String>
Export wallet seed
Sourcepub async fn get_dag_data(&self) -> Result<Value>
pub async fn get_dag_data(&self) -> Result<Value>
Get DAG visualization data
Sourcepub async fn debug_network(&self) -> Result<Value>
pub async fn debug_network(&self) -> Result<Value>
Debug network
Sourcepub async fn debug_consensus(&self) -> Result<Value>
pub async fn debug_consensus(&self) -> Result<Value>
Debug consensus
Sourcepub async fn debug_performance(&self) -> Result<Value>
pub async fn debug_performance(&self) -> Result<Value>
Debug performance
Sourcepub async fn security_audit(&self) -> Result<Value>
pub async fn security_audit(&self) -> Result<Value>
Security audit
Sourcepub async fn get_config(&self) -> Result<Value>
pub async fn get_config(&self) -> Result<Value>
Get configuration
Sourcepub async fn update_config(&self, config: Value) -> Result<()>
pub async fn update_config(&self, config: Value) -> Result<()>
Update configuration
Sourcepub async fn validate_config(&self, config: Value) -> Result<bool>
pub async fn validate_config(&self, config: Value) -> Result<bool>
Validate configuration
Auto Trait Implementations§
impl Freeze for RpcClient
impl !RefUnwindSafe for RpcClient
impl Send for RpcClient
impl Sync for RpcClient
impl Unpin for RpcClient
impl !UnwindSafe for RpcClient
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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