Skip to main content

satrush_client/generated/instructions/
claim_sats.rs

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