jito_vault_client/generated/instructions/
enqueue_withdrawal.rs

1//! This code was AUTOGENERATED using the kinobi library.
2//! Please DO NOT EDIT THIS FILE, instead use visitors
3//! to add features, then rerun kinobi to update it.
4//!
5//! <https://github.com/kinobi-so/kinobi>
6
7use borsh::{BorshDeserialize, BorshSerialize};
8
9/// Accounts.
10pub struct EnqueueWithdrawal {
11    pub config: solana_program::pubkey::Pubkey,
12
13    pub vault: solana_program::pubkey::Pubkey,
14
15    pub vault_staker_withdrawal_ticket: solana_program::pubkey::Pubkey,
16
17    pub vault_staker_withdrawal_ticket_token_account: solana_program::pubkey::Pubkey,
18
19    pub staker: solana_program::pubkey::Pubkey,
20
21    pub staker_vrt_token_account: solana_program::pubkey::Pubkey,
22
23    pub base: solana_program::pubkey::Pubkey,
24
25    pub token_program: solana_program::pubkey::Pubkey,
26
27    pub system_program: solana_program::pubkey::Pubkey,
28    /// Signer for burning
29    pub burn_signer: Option<solana_program::pubkey::Pubkey>,
30}
31
32impl EnqueueWithdrawal {
33    pub fn instruction(
34        &self,
35        args: EnqueueWithdrawalInstructionArgs,
36    ) -> solana_program::instruction::Instruction {
37        self.instruction_with_remaining_accounts(args, &[])
38    }
39    #[allow(clippy::vec_init_then_push)]
40    pub fn instruction_with_remaining_accounts(
41        &self,
42        args: EnqueueWithdrawalInstructionArgs,
43        remaining_accounts: &[solana_program::instruction::AccountMeta],
44    ) -> solana_program::instruction::Instruction {
45        let mut accounts = Vec::with_capacity(10 + remaining_accounts.len());
46        accounts.push(solana_program::instruction::AccountMeta::new_readonly(
47            self.config,
48            false,
49        ));
50        accounts.push(solana_program::instruction::AccountMeta::new(
51            self.vault, false,
52        ));
53        accounts.push(solana_program::instruction::AccountMeta::new(
54            self.vault_staker_withdrawal_ticket,
55            false,
56        ));
57        accounts.push(solana_program::instruction::AccountMeta::new(
58            self.vault_staker_withdrawal_ticket_token_account,
59            false,
60        ));
61        accounts.push(solana_program::instruction::AccountMeta::new(
62            self.staker,
63            true,
64        ));
65        accounts.push(solana_program::instruction::AccountMeta::new(
66            self.staker_vrt_token_account,
67            false,
68        ));
69        accounts.push(solana_program::instruction::AccountMeta::new_readonly(
70            self.base, true,
71        ));
72        accounts.push(solana_program::instruction::AccountMeta::new_readonly(
73            self.token_program,
74            false,
75        ));
76        accounts.push(solana_program::instruction::AccountMeta::new_readonly(
77            self.system_program,
78            false,
79        ));
80        if let Some(burn_signer) = self.burn_signer {
81            accounts.push(solana_program::instruction::AccountMeta::new_readonly(
82                burn_signer,
83                true,
84            ));
85        } else {
86            accounts.push(solana_program::instruction::AccountMeta::new_readonly(
87                crate::JITO_VAULT_ID,
88                false,
89            ));
90        }
91        accounts.extend_from_slice(remaining_accounts);
92        let mut data = EnqueueWithdrawalInstructionData::new()
93            .try_to_vec()
94            .unwrap();
95        let mut args = args.try_to_vec().unwrap();
96        data.append(&mut args);
97
98        solana_program::instruction::Instruction {
99            program_id: crate::JITO_VAULT_ID,
100            accounts,
101            data,
102        }
103    }
104}
105
106#[derive(BorshDeserialize, BorshSerialize)]
107pub struct EnqueueWithdrawalInstructionData {
108    discriminator: u8,
109}
110
111impl EnqueueWithdrawalInstructionData {
112    pub fn new() -> Self {
113        Self { discriminator: 12 }
114    }
115}
116
117impl Default for EnqueueWithdrawalInstructionData {
118    fn default() -> Self {
119        Self::new()
120    }
121}
122
123#[derive(BorshSerialize, BorshDeserialize, Clone, Debug, Eq, PartialEq)]
124#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
125pub struct EnqueueWithdrawalInstructionArgs {
126    pub amount: u64,
127}
128
129/// Instruction builder for `EnqueueWithdrawal`.
130///
131/// ### Accounts:
132///
133///   0. `[]` config
134///   1. `[writable]` vault
135///   2. `[writable]` vault_staker_withdrawal_ticket
136///   3. `[writable]` vault_staker_withdrawal_ticket_token_account
137///   4. `[writable, signer]` staker
138///   5. `[writable]` staker_vrt_token_account
139///   6. `[signer]` base
140///   7. `[optional]` token_program (default to `TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA`)
141///   8. `[optional]` system_program (default to `11111111111111111111111111111111`)
142///   9. `[signer, optional]` burn_signer
143#[derive(Clone, Debug, Default)]
144pub struct EnqueueWithdrawalBuilder {
145    config: Option<solana_program::pubkey::Pubkey>,
146    vault: Option<solana_program::pubkey::Pubkey>,
147    vault_staker_withdrawal_ticket: Option<solana_program::pubkey::Pubkey>,
148    vault_staker_withdrawal_ticket_token_account: Option<solana_program::pubkey::Pubkey>,
149    staker: Option<solana_program::pubkey::Pubkey>,
150    staker_vrt_token_account: Option<solana_program::pubkey::Pubkey>,
151    base: Option<solana_program::pubkey::Pubkey>,
152    token_program: Option<solana_program::pubkey::Pubkey>,
153    system_program: Option<solana_program::pubkey::Pubkey>,
154    burn_signer: Option<solana_program::pubkey::Pubkey>,
155    amount: Option<u64>,
156    __remaining_accounts: Vec<solana_program::instruction::AccountMeta>,
157}
158
159impl EnqueueWithdrawalBuilder {
160    pub fn new() -> Self {
161        Self::default()
162    }
163    #[inline(always)]
164    pub fn config(&mut self, config: solana_program::pubkey::Pubkey) -> &mut Self {
165        self.config = Some(config);
166        self
167    }
168    #[inline(always)]
169    pub fn vault(&mut self, vault: solana_program::pubkey::Pubkey) -> &mut Self {
170        self.vault = Some(vault);
171        self
172    }
173    #[inline(always)]
174    pub fn vault_staker_withdrawal_ticket(
175        &mut self,
176        vault_staker_withdrawal_ticket: solana_program::pubkey::Pubkey,
177    ) -> &mut Self {
178        self.vault_staker_withdrawal_ticket = Some(vault_staker_withdrawal_ticket);
179        self
180    }
181    #[inline(always)]
182    pub fn vault_staker_withdrawal_ticket_token_account(
183        &mut self,
184        vault_staker_withdrawal_ticket_token_account: solana_program::pubkey::Pubkey,
185    ) -> &mut Self {
186        self.vault_staker_withdrawal_ticket_token_account =
187            Some(vault_staker_withdrawal_ticket_token_account);
188        self
189    }
190    #[inline(always)]
191    pub fn staker(&mut self, staker: solana_program::pubkey::Pubkey) -> &mut Self {
192        self.staker = Some(staker);
193        self
194    }
195    #[inline(always)]
196    pub fn staker_vrt_token_account(
197        &mut self,
198        staker_vrt_token_account: solana_program::pubkey::Pubkey,
199    ) -> &mut Self {
200        self.staker_vrt_token_account = Some(staker_vrt_token_account);
201        self
202    }
203    #[inline(always)]
204    pub fn base(&mut self, base: solana_program::pubkey::Pubkey) -> &mut Self {
205        self.base = Some(base);
206        self
207    }
208    /// `[optional account, default to 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA']`
209    #[inline(always)]
210    pub fn token_program(&mut self, token_program: solana_program::pubkey::Pubkey) -> &mut Self {
211        self.token_program = Some(token_program);
212        self
213    }
214    /// `[optional account, default to '11111111111111111111111111111111']`
215    #[inline(always)]
216    pub fn system_program(&mut self, system_program: solana_program::pubkey::Pubkey) -> &mut Self {
217        self.system_program = Some(system_program);
218        self
219    }
220    /// `[optional account]`
221    /// Signer for burning
222    #[inline(always)]
223    pub fn burn_signer(
224        &mut self,
225        burn_signer: Option<solana_program::pubkey::Pubkey>,
226    ) -> &mut Self {
227        self.burn_signer = burn_signer;
228        self
229    }
230    #[inline(always)]
231    pub fn amount(&mut self, amount: u64) -> &mut Self {
232        self.amount = Some(amount);
233        self
234    }
235    /// Add an additional account to the instruction.
236    #[inline(always)]
237    pub fn add_remaining_account(
238        &mut self,
239        account: solana_program::instruction::AccountMeta,
240    ) -> &mut Self {
241        self.__remaining_accounts.push(account);
242        self
243    }
244    /// Add additional accounts to the instruction.
245    #[inline(always)]
246    pub fn add_remaining_accounts(
247        &mut self,
248        accounts: &[solana_program::instruction::AccountMeta],
249    ) -> &mut Self {
250        self.__remaining_accounts.extend_from_slice(accounts);
251        self
252    }
253    #[allow(clippy::clone_on_copy)]
254    pub fn instruction(&self) -> solana_program::instruction::Instruction {
255        let accounts = EnqueueWithdrawal {
256            config: self.config.expect("config is not set"),
257            vault: self.vault.expect("vault is not set"),
258            vault_staker_withdrawal_ticket: self
259                .vault_staker_withdrawal_ticket
260                .expect("vault_staker_withdrawal_ticket is not set"),
261            vault_staker_withdrawal_ticket_token_account: self
262                .vault_staker_withdrawal_ticket_token_account
263                .expect("vault_staker_withdrawal_ticket_token_account is not set"),
264            staker: self.staker.expect("staker is not set"),
265            staker_vrt_token_account: self
266                .staker_vrt_token_account
267                .expect("staker_vrt_token_account is not set"),
268            base: self.base.expect("base is not set"),
269            token_program: self.token_program.unwrap_or(solana_program::pubkey!(
270                "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
271            )),
272            system_program: self
273                .system_program
274                .unwrap_or(solana_program::pubkey!("11111111111111111111111111111111")),
275            burn_signer: self.burn_signer,
276        };
277        let args = EnqueueWithdrawalInstructionArgs {
278            amount: self.amount.clone().expect("amount is not set"),
279        };
280
281        accounts.instruction_with_remaining_accounts(args, &self.__remaining_accounts)
282    }
283}
284
285/// `enqueue_withdrawal` CPI accounts.
286pub struct EnqueueWithdrawalCpiAccounts<'a, 'b> {
287    pub config: &'b solana_program::account_info::AccountInfo<'a>,
288
289    pub vault: &'b solana_program::account_info::AccountInfo<'a>,
290
291    pub vault_staker_withdrawal_ticket: &'b solana_program::account_info::AccountInfo<'a>,
292
293    pub vault_staker_withdrawal_ticket_token_account:
294        &'b solana_program::account_info::AccountInfo<'a>,
295
296    pub staker: &'b solana_program::account_info::AccountInfo<'a>,
297
298    pub staker_vrt_token_account: &'b solana_program::account_info::AccountInfo<'a>,
299
300    pub base: &'b solana_program::account_info::AccountInfo<'a>,
301
302    pub token_program: &'b solana_program::account_info::AccountInfo<'a>,
303
304    pub system_program: &'b solana_program::account_info::AccountInfo<'a>,
305    /// Signer for burning
306    pub burn_signer: Option<&'b solana_program::account_info::AccountInfo<'a>>,
307}
308
309/// `enqueue_withdrawal` CPI instruction.
310pub struct EnqueueWithdrawalCpi<'a, 'b> {
311    /// The program to invoke.
312    pub __program: &'b solana_program::account_info::AccountInfo<'a>,
313
314    pub config: &'b solana_program::account_info::AccountInfo<'a>,
315
316    pub vault: &'b solana_program::account_info::AccountInfo<'a>,
317
318    pub vault_staker_withdrawal_ticket: &'b solana_program::account_info::AccountInfo<'a>,
319
320    pub vault_staker_withdrawal_ticket_token_account:
321        &'b solana_program::account_info::AccountInfo<'a>,
322
323    pub staker: &'b solana_program::account_info::AccountInfo<'a>,
324
325    pub staker_vrt_token_account: &'b solana_program::account_info::AccountInfo<'a>,
326
327    pub base: &'b solana_program::account_info::AccountInfo<'a>,
328
329    pub token_program: &'b solana_program::account_info::AccountInfo<'a>,
330
331    pub system_program: &'b solana_program::account_info::AccountInfo<'a>,
332    /// Signer for burning
333    pub burn_signer: Option<&'b solana_program::account_info::AccountInfo<'a>>,
334    /// The arguments for the instruction.
335    pub __args: EnqueueWithdrawalInstructionArgs,
336}
337
338impl<'a, 'b> EnqueueWithdrawalCpi<'a, 'b> {
339    pub fn new(
340        program: &'b solana_program::account_info::AccountInfo<'a>,
341        accounts: EnqueueWithdrawalCpiAccounts<'a, 'b>,
342        args: EnqueueWithdrawalInstructionArgs,
343    ) -> Self {
344        Self {
345            __program: program,
346            config: accounts.config,
347            vault: accounts.vault,
348            vault_staker_withdrawal_ticket: accounts.vault_staker_withdrawal_ticket,
349            vault_staker_withdrawal_ticket_token_account: accounts
350                .vault_staker_withdrawal_ticket_token_account,
351            staker: accounts.staker,
352            staker_vrt_token_account: accounts.staker_vrt_token_account,
353            base: accounts.base,
354            token_program: accounts.token_program,
355            system_program: accounts.system_program,
356            burn_signer: accounts.burn_signer,
357            __args: args,
358        }
359    }
360    #[inline(always)]
361    pub fn invoke(&self) -> solana_program::entrypoint::ProgramResult {
362        self.invoke_signed_with_remaining_accounts(&[], &[])
363    }
364    #[inline(always)]
365    pub fn invoke_with_remaining_accounts(
366        &self,
367        remaining_accounts: &[(
368            &'b solana_program::account_info::AccountInfo<'a>,
369            bool,
370            bool,
371        )],
372    ) -> solana_program::entrypoint::ProgramResult {
373        self.invoke_signed_with_remaining_accounts(&[], remaining_accounts)
374    }
375    #[inline(always)]
376    pub fn invoke_signed(
377        &self,
378        signers_seeds: &[&[&[u8]]],
379    ) -> solana_program::entrypoint::ProgramResult {
380        self.invoke_signed_with_remaining_accounts(signers_seeds, &[])
381    }
382    #[allow(clippy::clone_on_copy)]
383    #[allow(clippy::vec_init_then_push)]
384    pub fn invoke_signed_with_remaining_accounts(
385        &self,
386        signers_seeds: &[&[&[u8]]],
387        remaining_accounts: &[(
388            &'b solana_program::account_info::AccountInfo<'a>,
389            bool,
390            bool,
391        )],
392    ) -> solana_program::entrypoint::ProgramResult {
393        let mut accounts = Vec::with_capacity(10 + remaining_accounts.len());
394        accounts.push(solana_program::instruction::AccountMeta::new_readonly(
395            *self.config.key,
396            false,
397        ));
398        accounts.push(solana_program::instruction::AccountMeta::new(
399            *self.vault.key,
400            false,
401        ));
402        accounts.push(solana_program::instruction::AccountMeta::new(
403            *self.vault_staker_withdrawal_ticket.key,
404            false,
405        ));
406        accounts.push(solana_program::instruction::AccountMeta::new(
407            *self.vault_staker_withdrawal_ticket_token_account.key,
408            false,
409        ));
410        accounts.push(solana_program::instruction::AccountMeta::new(
411            *self.staker.key,
412            true,
413        ));
414        accounts.push(solana_program::instruction::AccountMeta::new(
415            *self.staker_vrt_token_account.key,
416            false,
417        ));
418        accounts.push(solana_program::instruction::AccountMeta::new_readonly(
419            *self.base.key,
420            true,
421        ));
422        accounts.push(solana_program::instruction::AccountMeta::new_readonly(
423            *self.token_program.key,
424            false,
425        ));
426        accounts.push(solana_program::instruction::AccountMeta::new_readonly(
427            *self.system_program.key,
428            false,
429        ));
430        if let Some(burn_signer) = self.burn_signer {
431            accounts.push(solana_program::instruction::AccountMeta::new_readonly(
432                *burn_signer.key,
433                true,
434            ));
435        } else {
436            accounts.push(solana_program::instruction::AccountMeta::new_readonly(
437                crate::JITO_VAULT_ID,
438                false,
439            ));
440        }
441        remaining_accounts.iter().for_each(|remaining_account| {
442            accounts.push(solana_program::instruction::AccountMeta {
443                pubkey: *remaining_account.0.key,
444                is_signer: remaining_account.1,
445                is_writable: remaining_account.2,
446            })
447        });
448        let mut data = EnqueueWithdrawalInstructionData::new()
449            .try_to_vec()
450            .unwrap();
451        let mut args = self.__args.try_to_vec().unwrap();
452        data.append(&mut args);
453
454        let instruction = solana_program::instruction::Instruction {
455            program_id: crate::JITO_VAULT_ID,
456            accounts,
457            data,
458        };
459        let mut account_infos = Vec::with_capacity(10 + 1 + remaining_accounts.len());
460        account_infos.push(self.__program.clone());
461        account_infos.push(self.config.clone());
462        account_infos.push(self.vault.clone());
463        account_infos.push(self.vault_staker_withdrawal_ticket.clone());
464        account_infos.push(self.vault_staker_withdrawal_ticket_token_account.clone());
465        account_infos.push(self.staker.clone());
466        account_infos.push(self.staker_vrt_token_account.clone());
467        account_infos.push(self.base.clone());
468        account_infos.push(self.token_program.clone());
469        account_infos.push(self.system_program.clone());
470        if let Some(burn_signer) = self.burn_signer {
471            account_infos.push(burn_signer.clone());
472        }
473        remaining_accounts
474            .iter()
475            .for_each(|remaining_account| account_infos.push(remaining_account.0.clone()));
476
477        if signers_seeds.is_empty() {
478            solana_program::program::invoke(&instruction, &account_infos)
479        } else {
480            solana_program::program::invoke_signed(&instruction, &account_infos, signers_seeds)
481        }
482    }
483}
484
485/// Instruction builder for `EnqueueWithdrawal` via CPI.
486///
487/// ### Accounts:
488///
489///   0. `[]` config
490///   1. `[writable]` vault
491///   2. `[writable]` vault_staker_withdrawal_ticket
492///   3. `[writable]` vault_staker_withdrawal_ticket_token_account
493///   4. `[writable, signer]` staker
494///   5. `[writable]` staker_vrt_token_account
495///   6. `[signer]` base
496///   7. `[]` token_program
497///   8. `[]` system_program
498///   9. `[signer, optional]` burn_signer
499#[derive(Clone, Debug)]
500pub struct EnqueueWithdrawalCpiBuilder<'a, 'b> {
501    instruction: Box<EnqueueWithdrawalCpiBuilderInstruction<'a, 'b>>,
502}
503
504impl<'a, 'b> EnqueueWithdrawalCpiBuilder<'a, 'b> {
505    pub fn new(program: &'b solana_program::account_info::AccountInfo<'a>) -> Self {
506        let instruction = Box::new(EnqueueWithdrawalCpiBuilderInstruction {
507            __program: program,
508            config: None,
509            vault: None,
510            vault_staker_withdrawal_ticket: None,
511            vault_staker_withdrawal_ticket_token_account: None,
512            staker: None,
513            staker_vrt_token_account: None,
514            base: None,
515            token_program: None,
516            system_program: None,
517            burn_signer: None,
518            amount: None,
519            __remaining_accounts: Vec::new(),
520        });
521        Self { instruction }
522    }
523    #[inline(always)]
524    pub fn config(
525        &mut self,
526        config: &'b solana_program::account_info::AccountInfo<'a>,
527    ) -> &mut Self {
528        self.instruction.config = Some(config);
529        self
530    }
531    #[inline(always)]
532    pub fn vault(&mut self, vault: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
533        self.instruction.vault = Some(vault);
534        self
535    }
536    #[inline(always)]
537    pub fn vault_staker_withdrawal_ticket(
538        &mut self,
539        vault_staker_withdrawal_ticket: &'b solana_program::account_info::AccountInfo<'a>,
540    ) -> &mut Self {
541        self.instruction.vault_staker_withdrawal_ticket = Some(vault_staker_withdrawal_ticket);
542        self
543    }
544    #[inline(always)]
545    pub fn vault_staker_withdrawal_ticket_token_account(
546        &mut self,
547        vault_staker_withdrawal_ticket_token_account: &'b solana_program::account_info::AccountInfo<
548            'a,
549        >,
550    ) -> &mut Self {
551        self.instruction
552            .vault_staker_withdrawal_ticket_token_account =
553            Some(vault_staker_withdrawal_ticket_token_account);
554        self
555    }
556    #[inline(always)]
557    pub fn staker(
558        &mut self,
559        staker: &'b solana_program::account_info::AccountInfo<'a>,
560    ) -> &mut Self {
561        self.instruction.staker = Some(staker);
562        self
563    }
564    #[inline(always)]
565    pub fn staker_vrt_token_account(
566        &mut self,
567        staker_vrt_token_account: &'b solana_program::account_info::AccountInfo<'a>,
568    ) -> &mut Self {
569        self.instruction.staker_vrt_token_account = Some(staker_vrt_token_account);
570        self
571    }
572    #[inline(always)]
573    pub fn base(&mut self, base: &'b solana_program::account_info::AccountInfo<'a>) -> &mut Self {
574        self.instruction.base = Some(base);
575        self
576    }
577    #[inline(always)]
578    pub fn token_program(
579        &mut self,
580        token_program: &'b solana_program::account_info::AccountInfo<'a>,
581    ) -> &mut Self {
582        self.instruction.token_program = Some(token_program);
583        self
584    }
585    #[inline(always)]
586    pub fn system_program(
587        &mut self,
588        system_program: &'b solana_program::account_info::AccountInfo<'a>,
589    ) -> &mut Self {
590        self.instruction.system_program = Some(system_program);
591        self
592    }
593    /// `[optional account]`
594    /// Signer for burning
595    #[inline(always)]
596    pub fn burn_signer(
597        &mut self,
598        burn_signer: Option<&'b solana_program::account_info::AccountInfo<'a>>,
599    ) -> &mut Self {
600        self.instruction.burn_signer = burn_signer;
601        self
602    }
603    #[inline(always)]
604    pub fn amount(&mut self, amount: u64) -> &mut Self {
605        self.instruction.amount = Some(amount);
606        self
607    }
608    /// Add an additional account to the instruction.
609    #[inline(always)]
610    pub fn add_remaining_account(
611        &mut self,
612        account: &'b solana_program::account_info::AccountInfo<'a>,
613        is_writable: bool,
614        is_signer: bool,
615    ) -> &mut Self {
616        self.instruction
617            .__remaining_accounts
618            .push((account, is_writable, is_signer));
619        self
620    }
621    /// Add additional accounts to the instruction.
622    ///
623    /// Each account is represented by a tuple of the `AccountInfo`, a `bool` indicating whether the account is writable or not,
624    /// and a `bool` indicating whether the account is a signer or not.
625    #[inline(always)]
626    pub fn add_remaining_accounts(
627        &mut self,
628        accounts: &[(
629            &'b solana_program::account_info::AccountInfo<'a>,
630            bool,
631            bool,
632        )],
633    ) -> &mut Self {
634        self.instruction
635            .__remaining_accounts
636            .extend_from_slice(accounts);
637        self
638    }
639    #[inline(always)]
640    pub fn invoke(&self) -> solana_program::entrypoint::ProgramResult {
641        self.invoke_signed(&[])
642    }
643    #[allow(clippy::clone_on_copy)]
644    #[allow(clippy::vec_init_then_push)]
645    pub fn invoke_signed(
646        &self,
647        signers_seeds: &[&[&[u8]]],
648    ) -> solana_program::entrypoint::ProgramResult {
649        let args = EnqueueWithdrawalInstructionArgs {
650            amount: self.instruction.amount.clone().expect("amount is not set"),
651        };
652        let instruction = EnqueueWithdrawalCpi {
653            __program: self.instruction.__program,
654
655            config: self.instruction.config.expect("config is not set"),
656
657            vault: self.instruction.vault.expect("vault is not set"),
658
659            vault_staker_withdrawal_ticket: self
660                .instruction
661                .vault_staker_withdrawal_ticket
662                .expect("vault_staker_withdrawal_ticket is not set"),
663
664            vault_staker_withdrawal_ticket_token_account: self
665                .instruction
666                .vault_staker_withdrawal_ticket_token_account
667                .expect("vault_staker_withdrawal_ticket_token_account is not set"),
668
669            staker: self.instruction.staker.expect("staker is not set"),
670
671            staker_vrt_token_account: self
672                .instruction
673                .staker_vrt_token_account
674                .expect("staker_vrt_token_account is not set"),
675
676            base: self.instruction.base.expect("base is not set"),
677
678            token_program: self
679                .instruction
680                .token_program
681                .expect("token_program is not set"),
682
683            system_program: self
684                .instruction
685                .system_program
686                .expect("system_program is not set"),
687
688            burn_signer: self.instruction.burn_signer,
689            __args: args,
690        };
691        instruction.invoke_signed_with_remaining_accounts(
692            signers_seeds,
693            &self.instruction.__remaining_accounts,
694        )
695    }
696}
697
698#[derive(Clone, Debug)]
699struct EnqueueWithdrawalCpiBuilderInstruction<'a, 'b> {
700    __program: &'b solana_program::account_info::AccountInfo<'a>,
701    config: Option<&'b solana_program::account_info::AccountInfo<'a>>,
702    vault: Option<&'b solana_program::account_info::AccountInfo<'a>>,
703    vault_staker_withdrawal_ticket: Option<&'b solana_program::account_info::AccountInfo<'a>>,
704    vault_staker_withdrawal_ticket_token_account:
705        Option<&'b solana_program::account_info::AccountInfo<'a>>,
706    staker: Option<&'b solana_program::account_info::AccountInfo<'a>>,
707    staker_vrt_token_account: Option<&'b solana_program::account_info::AccountInfo<'a>>,
708    base: Option<&'b solana_program::account_info::AccountInfo<'a>>,
709    token_program: Option<&'b solana_program::account_info::AccountInfo<'a>>,
710    system_program: Option<&'b solana_program::account_info::AccountInfo<'a>>,
711    burn_signer: Option<&'b solana_program::account_info::AccountInfo<'a>>,
712    amount: Option<u64>,
713    /// Additional instruction accounts `(AccountInfo, is_writable, is_signer)`.
714    __remaining_accounts: Vec<(
715        &'b solana_program::account_info::AccountInfo<'a>,
716        bool,
717        bool,
718    )>,
719}