jito_bundle/bundler/builder/types.rs
1use crate::bundler::types::{BundleInstructionSlots, TipMode};
2use solana_pubkey::Pubkey;
3use solana_sdk::address_lookup_table::AddressLookupTableAccount;
4use solana_sdk::hash::Hash;
5use solana_sdk::signature::Keypair;
6
7/// Inputs required to build a Jito bundle.
8pub struct BundleBuilderInputs<'a> {
9 /// Signing payer used for all compiled transactions.
10 pub payer: &'a Keypair,
11 /// Fixed instruction slots (max 5).
12 pub transactions_instructions: BundleInstructionSlots,
13 /// Lookup tables used for v0 message compilation.
14 pub lookup_tables: &'a [AddressLookupTableAccount],
15 /// Recent blockhash used for all compiled messages.
16 pub recent_blockhash: Hash,
17 /// Tip amount in lamports.
18 pub tip_lamports: u64,
19 /// Optional `jitodontfront` account to inject.
20 pub jitodontfront_pubkey: Option<&'a Pubkey>,
21 /// Compute unit limit prepended to each transaction.
22 pub compute_unit_limit: u32,
23}
24
25/// Mutable builder state used while constructing a bundle.
26pub struct BundleBuilder<'a> {
27 /// Signing payer used for all compiled transactions.
28 pub payer: &'a Keypair,
29 /// Fixed instruction slots (max 5).
30 pub transactions_instructions: BundleInstructionSlots,
31 /// Lookup tables used for v0 message compilation.
32 pub lookup_tables: &'a [AddressLookupTableAccount],
33 /// Recent blockhash used for all compiled messages.
34 pub recent_blockhash: Hash,
35 /// Tip amount in lamports.
36 pub tip_lamports: u64,
37 /// Optional `jitodontfront` account to inject.
38 pub jitodontfront_pubkey: Option<&'a Pubkey>,
39 /// Compute unit limit prepended to each transaction.
40 pub compute_unit_limit: u32,
41 /// Randomly chosen Jito tip account for this build.
42 pub tip_account: Pubkey,
43 /// Final tip placement mode selected during build.
44 pub tip_mode: TipMode,
45}