pub struct LighthouseUtil {}Implementations§
Source§impl LighthouseUtil
impl LighthouseUtil
Sourcepub async fn add_fee_payer_assertion(
transaction: &mut VersionedTransaction,
rpc_client: &RpcClient,
fee_payer: &Pubkey,
estimated_fee: u64,
config: &LighthouseConfig,
will_send: bool,
) -> Result<(), KoraError>
pub async fn add_fee_payer_assertion( transaction: &mut VersionedTransaction, rpc_client: &RpcClient, fee_payer: &Pubkey, estimated_fee: u64, config: &LighthouseConfig, will_send: bool, ) -> Result<(), KoraError>
Add a fee payer balance assertion to a transaction if lighthouse is enabled and not sending. Asserts that fee payer balance >= (current_balance - estimated_fee) at transaction end.
The will_send parameter indicates if the transaction will be sent to the network directly.
When will_send is true, the assertion is skipped because modifying the message would
invalidate existing client signatures.
Auto Trait Implementations§
impl Freeze for LighthouseUtil
impl RefUnwindSafe for LighthouseUtil
impl Send for LighthouseUtil
impl Sync for LighthouseUtil
impl Unpin for LighthouseUtil
impl UnsafeUnpin for LighthouseUtil
impl UnwindSafe for LighthouseUtil
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 moreCreates a shared type from an unshared type.