pub struct HTTPClient {
pub public_key: Option<Pubkey>,
/* private fields */
}
Fields§
§public_key: Option<Pubkey>
Implementations§
Source§impl HTTPClient
impl HTTPClient
pub async fn get_raydium_quotes( &self, request: &GetRaydiumQuotesRequest, ) -> Result<GetRaydiumQuotesResponse>
pub async fn get_raydium_cpmm_quotes( &self, request: &GetRaydiumCpmmQuotesRequest, ) -> Result<GetRaydiumCpmmQuotesResponse>
pub async fn get_raydium_clmm_quotes( &self, request: &GetRaydiumClmmQuotesRequest, ) -> Result<GetRaydiumClmmQuotesResponse>
pub async fn get_pump_fun_quotes( &self, request: &GetPumpFunQuotesRequest, ) -> Result<GetPumpFunQuotesResponse>
pub async fn get_jupiter_quotes( &self, request: &GetJupiterQuotesRequest, ) -> Result<GetJupiterQuotesResponse>
pub async fn get_quotes( &self, in_token: &str, out_token: &str, in_amount: f64, slippage: f64, limit: i32, projects: &[Project], ) -> Result<GetQuotesResponse>
pub async fn get_raydium_prices( &self, tokens: Vec<String>, ) -> Result<GetRaydiumPricesResponse>
pub async fn get_jupiter_prices( &self, tokens: Vec<String>, ) -> Result<GetJupiterPricesResponse>
Source§impl HTTPClient
impl HTTPClient
pub async fn post_raydium_swap( &self, request: &PostRaydiumSwapRequest, ) -> Result<PostRaydiumSwapResponse>
pub async fn post_raydium_route_swap( &self, request: &PostRaydiumRouteSwapRequest, ) -> Result<PostRaydiumRouteSwapResponse>
pub async fn post_raydium_swap_instructions( &self, request: &PostRaydiumSwapInstructionsRequest, ) -> Result<PostRaydiumSwapInstructionsResponse>
pub async fn submit_raydium_swap_instructions( &self, request: PostRaydiumSwapInstructionsRequest, submit_opts: SubmitParams, use_bundle: bool, ) -> Result<Vec<String>>
pub async fn post_raydium_cpmm_swap( &self, request: &PostRaydiumCpmmSwapRequest, ) -> Result<PostRaydiumCpmmSwapResponse>
pub async fn post_raydium_clmm_swap( &self, request: &PostRaydiumSwapRequest, ) -> Result<PostRaydiumSwapResponse>
pub async fn post_raydium_clmm_route_swap( &self, request: &PostRaydiumRouteSwapRequest, ) -> Result<PostRaydiumRouteSwapResponse>
pub async fn post_jupiter_swap( &self, request: &PostJupiterSwapRequest, ) -> Result<PostJupiterSwapResponse>
pub async fn post_jupiter_route_swap( &self, request: &PostJupiterRouteSwapRequest, ) -> Result<PostJupiterRouteSwapResponse>
pub async fn post_jupiter_swap_instructions( &self, request: &PostJupiterSwapInstructionsRequest, ) -> Result<PostJupiterSwapInstructionsResponse>
pub async fn submit_jupiter_swap_instructions( &self, request: PostJupiterSwapInstructionsRequest, submit_opts: SubmitParams, use_bundle: bool, ) -> Result<Vec<String>>
pub async fn post_trade_swap( &self, request: &TradeSwapRequest, ) -> Result<TradeSwapResponse>
pub async fn post_route_trade_swap( &self, request: &RouteTradeSwapRequest, ) -> Result<TradeSwapResponse>
Source§impl HTTPClient
impl HTTPClient
pub fn get_keypair(&self) -> Result<&Keypair>
pub fn new(endpoint: Option<String>) -> Result<Self>
pub async fn sign_and_submit<T: IntoTransactionMessage + Clone>( &self, txs: Vec<T>, submit_opts: SubmitParams, use_bundle: bool, ) -> Result<Vec<String>>
pub async fn sign_and_submit_snipe<T: IntoTransactionMessage + Clone>( &self, txs: Vec<T>, use_staked_rpcs: bool, ) -> Result<Vec<String>>
pub async fn sign_and_submit_paladin<T: IntoTransactionMessage + Clone>( &self, tx: T, ) -> Result<String>
pub async fn get_transaction( &self, request: &GetTransactionRequest, ) -> Result<GetTransactionResponse>
pub async fn get_recent_block_hash(&self) -> Result<GetRecentBlockHashResponse>
pub async fn get_recent_block_hash_v2( &self, request: &GetRecentBlockHashRequestV2, ) -> Result<GetRecentBlockHashResponseV2>
pub async fn get_rate_limit(&self) -> Result<GetRateLimitResponse>
pub async fn get_account_balance_v2( &self, request: GetAccountBalanceRequest, ) -> Result<GetAccountBalanceResponse>
pub async fn get_priority_fee( &self, project: Project, percentile: Option<f64>, ) -> Result<GetPriorityFeeResponse>
pub async fn get_priority_fee_by_program( &self, programs: Vec<String>, ) -> Result<GetPriorityFeeByProgramResponse>
pub async fn get_token_accounts( &self, owner_address: String, ) -> Result<GetTokenAccountsResponse>
pub async fn get_account_balance( &self, owner_address: String, ) -> Result<GetAccountBalanceResponse>
pub async fn get_leader_schedule( &self, max_slots: u64, ) -> Result<GetLeaderScheduleResponse>
Auto Trait Implementations§
impl Freeze for HTTPClient
impl !RefUnwindSafe for HTTPClient
impl Send for HTTPClient
impl Sync for HTTPClient
impl Unpin for HTTPClient
impl !UnwindSafe for HTTPClient
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
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request