pub struct JitoClient { /* private fields */ }Expand description
Jito client for sending transactions and bundles.
Implementations§
Source§impl JitoClient
impl JitoClient
Sourcepub async fn raw_send_api(
&self,
api_url: impl AsRef<str>,
body: &Value,
) -> Result<Response>
pub async fn raw_send_api( &self, api_url: impl AsRef<str>, body: &Value, ) -> Result<Response>
Sends a raw request, use base_url + api_url.
Sourcepub async fn raw_send_lazy(
&self,
body: impl Future<Output = Result<Value>>,
) -> Result<Response>
pub async fn raw_send_lazy( &self, body: impl Future<Output = Result<Value>>, ) -> Result<Response>
Sends a raw request, with lazy body construction.
Sourcepub async fn raw_send_api_lazy(
&self,
api_url: impl AsRef<str>,
body: impl Future<Output = Result<Value>>,
) -> Result<Response>
pub async fn raw_send_api_lazy( &self, api_url: impl AsRef<str>, body: impl Future<Output = Result<Value>>, ) -> Result<Response>
Sends a raw request, use base_url + api_url, with lazy body construction.
Sourcepub async fn raw_send_lazy_fn<F>(&self, callback: F) -> Result<Response>
pub async fn raw_send_lazy_fn<F>(&self, callback: F) -> Result<Response>
Sends a raw request, with lazy function to build the body.
Sourcepub async fn raw_send_api_lazy_fn<F>(
&self,
api_url: impl AsRef<str>,
callback: F,
) -> Result<Response>
pub async fn raw_send_api_lazy_fn<F>( &self, api_url: impl AsRef<str>, callback: F, ) -> Result<Response>
Sends a raw request, use base_url + api_url, with lazy function to build the body.
Sourcepub async fn send_transaction(&self, tx: impl Serialize) -> Result<Response>
pub async fn send_transaction(&self, tx: impl Serialize) -> Result<Response>
Sends a single transaction and returns the HTTP response.
Sourcepub async fn send_transaction_bid(&self, tx: impl Serialize) -> Result<String>
pub async fn send_transaction_bid(&self, tx: impl Serialize) -> Result<String>
Sends a transaction and returns the bundle ID from the response headers.
Sourcepub async fn send_transaction_no_bundle_only(
&self,
tx: impl Serialize,
) -> Result<Response>
pub async fn send_transaction_no_bundle_only( &self, tx: impl Serialize, ) -> Result<Response>
Sends a transaction without bundleOnly flag.
Sourcepub async fn send_bundle<T: IntoIterator<Item = impl Serialize>>(
&self,
tx: T,
) -> Result<Response>
pub async fn send_bundle<T: IntoIterator<Item = impl Serialize>>( &self, tx: T, ) -> Result<Response>
Sends multiple transactions as a bundle.
Sourcepub async fn send_bundle_bid<T: IntoIterator<Item = impl Serialize>>(
&self,
tx: T,
) -> Result<String>
pub async fn send_bundle_bid<T: IntoIterator<Item = impl Serialize>>( &self, tx: T, ) -> Result<String>
Sends a bundle and returns its bundle ID from the JSON response.
Sourcepub async fn send_transaction_lazy<T>(
&self,
tx: impl Future<Output = Result<T>>,
) -> Result<Response>where
T: Serialize,
pub async fn send_transaction_lazy<T>(
&self,
tx: impl Future<Output = Result<T>>,
) -> Result<Response>where
T: Serialize,
Sends a single transaction and returns the HTTP response, with lazy serialization.
Sourcepub async fn send_transaction_bid_lazy<T>(
&self,
tx: impl Future<Output = Result<T>>,
) -> Result<String>where
T: Serialize,
pub async fn send_transaction_bid_lazy<T>(
&self,
tx: impl Future<Output = Result<T>>,
) -> Result<String>where
T: Serialize,
Sends a transaction and returns the bundle ID from the response headers, with lazy serialization.
Sourcepub async fn send_transaction_no_bundle_only_lazy<T>(
&self,
tx: impl Future<Output = Result<T>>,
) -> Result<Response>where
T: Serialize,
pub async fn send_transaction_no_bundle_only_lazy<T>(
&self,
tx: impl Future<Output = Result<T>>,
) -> Result<Response>where
T: Serialize,
Sends a transaction without bundleOnly flag, with lazy serialization.
Sourcepub async fn send_bundle_lazy<T, S>(
&self,
tx: impl Future<Output = Result<T>>,
) -> Result<Response>where
T: IntoIterator<Item = S>,
S: Serialize,
pub async fn send_bundle_lazy<T, S>(
&self,
tx: impl Future<Output = Result<T>>,
) -> Result<Response>where
T: IntoIterator<Item = S>,
S: Serialize,
Sends multiple transactions as a bundle, with lazy serialization.
Sourcepub async fn send_bundle_bid_lazy<T, S>(
&self,
tx: impl Future<Output = Result<T>>,
) -> Result<String>where
T: IntoIterator<Item = S>,
S: Serialize,
pub async fn send_bundle_bid_lazy<T, S>(
&self,
tx: impl Future<Output = Result<T>>,
) -> Result<String>where
T: IntoIterator<Item = S>,
S: Serialize,
Sends a bundle and returns its bundle ID from the JSON response, with lazy serialization.
Sourcepub async fn send_transaction_lazy_fn<F, T>(
&self,
callback: F,
) -> Result<Response>
pub async fn send_transaction_lazy_fn<F, T>( &self, callback: F, ) -> Result<Response>
Sends a single transaction and returns the HTTP response, with lazy serialization.
Sourcepub async fn send_transaction_bid_lazy_fn<F, T>(
&self,
callback: F,
) -> Result<String>
pub async fn send_transaction_bid_lazy_fn<F, T>( &self, callback: F, ) -> Result<String>
Sends a transaction and returns the bundle ID from the response headers, with lazy serialization.
Sourcepub async fn send_transaction_no_bundle_only_lazy_fn<F, T>(
&self,
callback: F,
) -> Result<Response>
pub async fn send_transaction_no_bundle_only_lazy_fn<F, T>( &self, callback: F, ) -> Result<Response>
Sends a transaction without bundleOnly flag, with lazy serialization.
Sourcepub async fn send_bundle_lazy_fn<F, T, S>(
&self,
callback: F,
) -> Result<Response>
pub async fn send_bundle_lazy_fn<F, T, S>( &self, callback: F, ) -> Result<Response>
Sends multiple transactions as a bundle, with lazy serialization.
Sourcepub async fn send_bundle_bid_lazy_fn<F, T, S>(
&self,
callback: F,
) -> Result<String>
pub async fn send_bundle_bid_lazy_fn<F, T, S>( &self, callback: F, ) -> Result<String>
Sends a bundle and returns its bundle ID from the JSON response, with lazy serialization.
Trait Implementations§
Source§impl Clone for JitoClient
impl Clone for JitoClient
Source§fn clone(&self) -> JitoClient
fn clone(&self) -> JitoClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more