Struct GrpcClient

Source
pub struct GrpcClient {
    pub public_key: Option<Pubkey>,
    /* private fields */
}

Fields§

§public_key: Option<Pubkey>

Implementations§

Source§

impl GrpcClient

Source§

impl GrpcClient

Source

pub async fn get_prices_stream( &mut self, projects: Vec<Project>, tokens: Vec<String>, ) -> Result<Streaming<GetPricesStreamResponse>>

Source

pub async fn get_block_stream( &mut self, ) -> Result<Streaming<GetBlockStreamResponse>>

Source

pub async fn get_orderbook_stream( &mut self, markets: Vec<String>, limit: u32, project: Project, ) -> Result<Streaming<GetOrderbooksStreamResponse>>

Source

pub async fn get_market_depths_stream( &mut self, markets: Vec<String>, limit: u32, project: Project, ) -> Result<Streaming<GetMarketDepthsStreamResponse>>

Source

pub async fn get_ticker_stream( &mut self, markets: Vec<String>, project: Project, ) -> Result<Streaming<GetTickersStreamResponse>>

Source

pub async fn get_trades_stream( &mut self, market: String, limit: u32, project: Project, ) -> Result<Streaming<GetTradesStreamResponse>>

Source

pub async fn get_swaps_stream( &mut self, projects: Vec<Project>, pools: Vec<String>, include_failed: bool, ) -> Result<Streaming<GetSwapsStreamResponse>>

Source

pub async fn get_new_raydium_pools_stream( &mut self, include_cpmm: bool, ) -> Result<Streaming<GetNewRaydiumPoolsResponse>>

Source

pub async fn get_new_raydium_pools_by_transaction_stream( &mut self, ) -> Result<Streaming<GetNewRaydiumPoolsByTransactionResponse>>

Source

pub async fn get_recent_block_hash_stream( &mut self, ) -> Result<Streaming<GetRecentBlockHashResponse>>

Source

pub async fn get_pool_reserves_stream( &mut self, projects: Vec<Project>, pools: Vec<String>, ) -> Result<Streaming<GetPoolReservesStreamResponse>>

Source

pub async fn get_priority_fee_stream( &mut self, project: Project, percentile: Option<f64>, ) -> Result<Streaming<GetPriorityFeeResponse>>

Source

pub async fn get_bundle_tip_stream( &mut self, ) -> Result<Streaming<GetBundleTipResponse>>

Source

pub async fn get_pump_fun_new_tokens_stream( &mut self, ) -> Result<Streaming<GetPumpFunNewTokensStreamResponse>>

Source

pub async fn get_pump_fun_swaps_stream( &mut self, tokens: Vec<String>, ) -> Result<Streaming<GetPumpFunSwapsStreamResponse>>

Source

pub async fn get_priority_fee_by_program_stream( &mut self, projects: Vec<String>, ) -> Result<Streaming<GetPriorityFeeByProgramResponse>>

Source§

impl GrpcClient

Source

pub async fn post_raydium_swap( &mut self, request: &PostRaydiumSwapRequest, ) -> Result<PostRaydiumSwapResponse>

Source

pub async fn post_raydium_route_swap( &mut self, request: &PostRaydiumRouteSwapRequest, ) -> Result<PostRaydiumRouteSwapResponse>

Source

pub async fn post_raydium_swap_instructions( &mut self, request: &PostRaydiumSwapInstructionsRequest, ) -> Result<PostRaydiumSwapInstructionsResponse>

Source

pub async fn submit_raydium_swap_instructions( &mut self, request: PostRaydiumSwapInstructionsRequest, submit_opts: SubmitParams, use_bundle: bool, ) -> Result<Vec<String>>

Source

pub async fn post_raydium_cpmm_swap( &mut self, request: &PostRaydiumCpmmSwapRequest, ) -> Result<PostRaydiumCpmmSwapResponse>

Source

pub async fn post_raydium_clmm_swap( &mut self, request: &PostRaydiumSwapRequest, ) -> Result<PostRaydiumSwapResponse>

Source

pub async fn post_raydium_clmm_route_swap( &mut self, request: &PostRaydiumRouteSwapRequest, ) -> Result<PostRaydiumRouteSwapResponse>

Source

pub async fn post_jupiter_swap( &mut self, request: &PostJupiterSwapRequest, ) -> Result<PostJupiterSwapResponse>

Source

pub async fn post_jupiter_route_swap( &mut self, request: &PostJupiterRouteSwapRequest, ) -> Result<PostJupiterRouteSwapResponse>

Source

pub async fn post_jupiter_swap_instructions( &mut self, request: &PostJupiterSwapInstructionsRequest, ) -> Result<PostJupiterSwapInstructionsResponse>

Source

pub async fn submit_jupiter_swap_instructions( &mut self, request: PostJupiterSwapInstructionsRequest, submit_opts: SubmitParams, use_bundle: bool, ) -> Result<Vec<String>>

Source

pub async fn post_pump_swap( &mut self, request: &PostPumpFunSwapRequest, ) -> Result<PostPumpFunSwapResponse>

Source

pub async fn post_trade_swap( &mut self, request: &TradeSwapRequest, ) -> Result<TradeSwapResponse>

Source

pub async fn post_route_trade_swap( &mut self, request: &RouteTradeSwapRequest, ) -> Result<TradeSwapResponse>

Source§

impl GrpcClient

Source

pub fn get_keypair(&self) -> Result<&Keypair>

Source

pub async fn new(endpoint: Option<String>) -> Result<Self>

Source

pub async fn sign_and_submit<T: IntoTransactionMessage + Clone>( &mut self, txs: Vec<T>, submit_opts: SubmitParams, use_bundle: bool, ) -> Result<Vec<String>>

Source

pub async fn sign_and_submit_snipe<T: IntoTransactionMessage + Clone>( &mut self, txs: Vec<T>, use_staked_rpcs: bool, ) -> Result<Vec<String>>

Source

pub async fn sign_and_submit_paladin<T: IntoTransactionMessage + Clone>( &mut self, tx: T, ) -> Result<String>

Source

pub async fn get_transaction( &mut self, request: &GetTransactionRequest, ) -> Result<GetTransactionResponse>

Source

pub async fn get_recent_block_hash( &mut self, request: &GetRecentBlockHashRequest, ) -> Result<GetRecentBlockHashResponse>

Source

pub async fn get_recent_block_hash_v2( &mut self, request: GetRecentBlockHashRequestV2, ) -> Result<GetRecentBlockHashResponseV2>

Source

pub async fn get_rate_limit( &mut self, request: &GetRateLimitRequest, ) -> Result<GetRateLimitResponse>

Source

pub async fn get_account_balance_v2( &mut self, request: &GetAccountBalanceRequest, ) -> Result<GetAccountBalanceResponse>

Source

pub async fn get_priority_fee( &mut self, project: Project, percentile: Option<f64>, ) -> Result<GetPriorityFeeResponse>

Source

pub async fn get_priority_fee_by_program( &mut self, programs: Vec<String>, ) -> Result<GetPriorityFeeByProgramResponse>

Source

pub async fn get_token_accounts( &mut self, owner_address: String, ) -> Result<GetTokenAccountsResponse>

Source

pub async fn get_account_balance( &mut self, owner_address: String, ) -> Result<GetAccountBalanceResponse>

Source

pub async fn get_leader_schedule( &mut self, max_slots: u64, ) -> Result<GetLeaderScheduleResponse>

Trait Implementations§

Source§

impl Debug for GrpcClient

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T