pub struct QuorumClient { /* private fields */ }Implementations§
Source§impl QuorumClient
impl QuorumClient
Sourcepub fn new(endpoint: impl Into<String>) -> Self
pub fn new(endpoint: impl Into<String>) -> Self
Creates a new QuorumClient pointing to the provided endpoint.
§Panics
Panics if the endpoint is not a valid URL. Use QuorumClient::try_new for a non-panicking constructor.
Sourcepub fn try_new(endpoint: impl Into<String>) -> Result<Self, QuorumError>
pub fn try_new(endpoint: impl Into<String>) -> Result<Self, QuorumError>
Creates a new QuorumClient pointing to the provided endpoint without panicking.
Sourcepub fn from_env() -> Result<Self, QuorumError>
pub fn from_env() -> Result<Self, QuorumError>
Builds a QuorumClient from environment variables (QUORUM_API_URL or QUORUM_ENDPOINT, and optional QUORUM_API_KEY),
falling back to the official managed gateway DEFAULT_ENDPOINT.
Sourcepub fn with_timeout(endpoint: impl Into<String>, timeout: Duration) -> Self
pub fn with_timeout(endpoint: impl Into<String>, timeout: Duration) -> Self
Creates a new QuorumClient with a custom timeout.
§Panics
Panics if the endpoint is not a valid URL. Use QuorumClient::try_with_timeout for a non-panicking constructor.
Sourcepub fn try_with_timeout(
endpoint: impl Into<String>,
timeout: Duration,
) -> Result<Self, QuorumError>
pub fn try_with_timeout( endpoint: impl Into<String>, timeout: Duration, ) -> Result<Self, QuorumError>
Creates a new QuorumClient with a custom timeout without panicking.
pub fn builder() -> QuorumClientBuilder
pub async fn execute( &self, tx: &(impl QuorumSerializableTransaction + ?Sized), objective: Objective, ) -> Result<ExecutionResult, QuorumError>
pub async fn execute_encoded( &self, wire_tx_b64: &str, objective: Objective, ) -> Result<ExecutionResult, QuorumError>
pub async fn get_recommended_fee( &self, objective: Objective, ) -> Result<u64, QuorumError>
pub async fn get_strategy( &self, objective: Objective, ) -> Result<Strategy, QuorumError>
pub async fn get_validators(&self) -> Result<Vec<ValidatorInfo>, QuorumError>
pub async fn get_congestion(&self) -> Result<CongestionSignal, QuorumError>
pub async fn health(&self) -> Result<HealthStatus, QuorumError>
Trait Implementations§
Source§impl Debug for QuorumClient
impl Debug for QuorumClient
Auto Trait Implementations§
impl !RefUnwindSafe for QuorumClient
impl !UnwindSafe for QuorumClient
impl Freeze for QuorumClient
impl Send for QuorumClient
impl Sync for QuorumClient
impl Unpin for QuorumClient
impl UnsafeUnpin for QuorumClient
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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