pub struct BundleBuilder<'a> {
pub payer: &'a Keypair,
pub transactions_instructions: BundleInstructionSlots,
pub lookup_tables: &'a [AddressLookupTableAccount],
pub recent_blockhash: Hash,
pub tip_lamports: u64,
pub jitodontfront_pubkey: Option<&'a Pubkey>,
pub compute_unit_limit: u32,
pub tip_account: Pubkey,
pub tip_mode: TipMode,
}Expand description
Mutable builder state used while constructing a bundle.
Fields§
§payer: &'a KeypairSigning payer used for all compiled transactions.
transactions_instructions: BundleInstructionSlotsFixed instruction slots (max 5).
lookup_tables: &'a [AddressLookupTableAccount]Lookup tables used for v0 message compilation.
recent_blockhash: HashRecent blockhash used for all compiled messages.
tip_lamports: u64Tip amount in lamports.
jitodontfront_pubkey: Option<&'a Pubkey>Optional jitodontfront account to inject.
compute_unit_limit: u32Compute unit limit prepended to each transaction.
tip_account: PubkeyRandomly chosen Jito tip account for this build.
tip_mode: TipModeFinal tip placement mode selected during build.
Implementations§
Source§impl<'a> BundleBuilder<'a>
impl<'a> BundleBuilder<'a>
Sourcepub fn build(inputs: BundleBuilderInputs<'a>) -> Result<BuiltBundle, JitoError>
pub fn build(inputs: BundleBuilderInputs<'a>) -> Result<BuiltBundle, JitoError>
Builds a final BuiltBundle from fixed instruction slots.
Jito hard-limits bundles to MAX_BUNDLE_TRANSACTIONS (5), so this builder
chooses tip placement based on remaining transaction capacity.
Build flow:
- Compact sparse slots while preserving transaction order.
- Optionally apply
jitodontfrontaccount rewriting. - Insert tip as separate tx when count < 5, or inline when count == 5.
- Validate tip account is not in LUTs for inline mode.
- Compile, sign, and size-check each transaction.
Returns JitoError for invalid bundle size, compile/sign failures,
oversized transactions, and invalid LUT tip-account usage.
Trait Implementations§
Source§impl BundleSlotView for BundleBuilder<'_>
impl BundleSlotView for BundleBuilder<'_>
Source§fn instruction_slots(&self) -> &BundleInstructionSlots
fn instruction_slots(&self) -> &BundleInstructionSlots
Returns the mutable builder’s current instruction slots view.
Source§fn populated_count(&self) -> usize
fn populated_count(&self) -> usize
Source§fn last_populated_index(&self) -> Option<usize>
fn last_populated_index(&self) -> Option<usize>
Auto Trait Implementations§
impl<'a> Freeze for BundleBuilder<'a>
impl<'a> RefUnwindSafe for BundleBuilder<'a>
impl<'a> Send for BundleBuilder<'a>
impl<'a> Sync for BundleBuilder<'a>
impl<'a> Unpin for BundleBuilder<'a>
impl<'a> UnwindSafe for BundleBuilder<'a>
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
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>
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>
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