pub struct TipHelper;Implementations§
Source§impl TipHelper
impl TipHelper
Sourcepub fn get_random_tip_account() -> Pubkey
pub fn get_random_tip_account() -> Pubkey
Picks a random Jito tip account from known constants.
Sourcepub fn create_tip_instruction_to(
payer: &Pubkey,
tip_account: &Pubkey,
tip_lamports: u64,
) -> Instruction
pub fn create_tip_instruction_to( payer: &Pubkey, tip_account: &Pubkey, tip_lamports: u64, ) -> Instruction
Creates a system transfer instruction for the tip payment.
Sourcepub async fn fetch_tip_floor(
client: &Client,
tip_floor_url: &str,
) -> Result<(u64, JitoTipFloorResponse), JitoError>
pub async fn fetch_tip_floor( client: &Client, tip_floor_url: &str, ) -> Result<(u64, JitoTipFloorResponse), JitoError>
Fetches current tip floor data and returns computed lamports.
Sourcepub async fn resolve_tip(
client: &Client,
tip_floor_url: &str,
strategy: &TipStrategy,
) -> Result<u64, JitoError>
pub async fn resolve_tip( client: &Client, tip_floor_url: &str, strategy: &TipStrategy, ) -> Result<u64, JitoError>
Resolves effective tip amount for the provided strategy.
Auto Trait Implementations§
impl Freeze for TipHelper
impl RefUnwindSafe for TipHelper
impl Send for TipHelper
impl Sync for TipHelper
impl Unpin for TipHelper
impl UnsafeUnpin for TipHelper
impl UnwindSafe for TipHelper
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> 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